fonction in python

Grant Edwards grante at visi.com
Tue Jul 4 12:18:29 EDT 2006


On 2006-07-04, aliassaf <assafal at ensieta.fr> wrote:

> But it is possible ? that is if I give to the program the values of X and Y,
> it will indicate to me the relation between the two variables, in the other
> hand if I look to the program x=2 y=4, x=3 y=9 ect... it is going to show me
> that f (t)!!! 

Sort of.  There are a number of curve-fitting modules available
for Python as part of packages like ScyPy http://www.scipy.org/
and Scientific Python http://sourcesup.cru.fr/projects/scientific-py/

You generally have to provide the fitter with a function
"template" for which it can find the coefficients.  For
example, you tell the fitter that you want a polynomial of the
form  f(y) = Ax^2 + Bx + C, and the fitter will find the values
of A, B, C that best fit the data.

There are also commercial products that have lists of hundreds
of "templates" and will crunch through thme to find the ones
that provide the best fits.
 
-- 
Grant Edwards
grante at visi.com



More information about the Python-list mailing list