Re: [jgap-users] One more on the statistics command
Brought to you by:
klausikm
From: Klaus M. <jg...@kl...> - 2010-01-28 10:22:28
|
Luis, the GP commands (like Add or your new command Standard Deviation) get the variables injected. In a previous mail you stated: c.execute_float(n, 0, args) + c.execute_float(n, 1, args) This is an example of retrieving parameter 0 (c.execute_float(n, 0, args)) and 1 (c.execute_float(n, 1, args)). You don't have to care about something else. If you want to, e.g., multiply four parameters within an command with arity 4 (like Mult4), then you would write: c.execute_float(n, 0, args) * c.execute_float(n, 1, args) * c.execute_float(n, 2, args) + c.execute_float(n, 3, args) For your standard deviation, just use the inputs as required. I think, It would be of general interest to have a function like Std. Deviation within JGAP. So please feel free to contribute :-) Best Klaus www.klaus-meffert.com <http://www.klaus-meffert.com/> _____ From: Luis Garcia [mailto:lga...@pr...] Sent: Thursday, January 28, 2010 7:01 AM To: jga...@li... Subject: [jgap-users] One more on the statistics command I think I need to reformulate my question because I may have gotten confused with the concept of GP and what I am trying to do. I have a time series set of data. I can pass sub-sets of values from that time series by feeding values to variables X1, X2, X3, ..., Xn in a loop (like in the Math problem, the only difference is that you feed one variable and I may do 10). Now, what happens is that I may take the standard deviation of the values from X1...Xn at one point. That I think can be part of a command. At some point in the program obtains the Standard Deviation of the set of variables or values I am passing to it. Now, my question is how do I programatically get the values of variables X1 to Xn at that point. Thanks and apologies for the confusion. Luis |