From: "jwmerrill@..." Date: 2007-12-17T15:10:22+09:00 Subject: Re: Curve fitting to data On Dec 16, 7:07 pm, Phil Rhoades 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. JM