JM, On Mon, 2007-12-17 at 15:10 +0900, jwmerrill / gmail.com wrote: > On Dec 16, 7:07 pm, Phil Rhoades <p... / pricom.com.au> wrote: > > > I think GNUPlot requires the knowledge of the type of fn you are trying > > to fit - I want the software to TELL me what sort of fn it is eg for the > > data: > > > > -10 0 > > -9 19 > > -8 36 > > -7 51 > > -6 64 > > -5 75 > > -4 84 > > -3 91 > > -2 96 > > -1 99 > > 0 100 > > 1 99 > > 2 96 > > 3 91 > > 4 84 > > 5 75 > > 6 64 > > 7 51 > > 8 36 > > 9 19 > > 10 0 > > > > http://www.zunzun.comtells me that the formula for this data is: > > > > y = a( atan(x) ) + b( x2 ) + c( sinh(x) ) + offset > > > > I would like to be able to do this myself with my own (preferably Ruby) > > code. > > > > Thanks, > > > > Phil. > > Isn't the result zunzun spit out "wrong"? The data is most simply > described as an inverted parabola: > > y = a x^2 + c > > This points exactly to the problem others have mentioned. Given a > large enough space of functions, you can fit practically anything, but > what does it mean? Generally speaking, no one has any business > fitting 21 data points with 4 parameters. Sorry, my cut and paste had a typo - I left out the "^", the formula should have been: y = a( atan(x) ) + b( x^2 ) + c( sinh(x) ) + offset which is closer to the parabola (and the zunzun display on the screen seemed perfect) but yes, you are correct. Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Fax: +61:(0)2-8221-9599 E-mail: phil / pricom.com.au