|
|||||
|
|
#1 |
|
|
I'd like to fit a curve (a rectangular hyperbola, in fact) to some data points as part of a program i'm writing. Can anyone suggest a package which would help me do this? A bit of googling suggests that SciPy might be what i want. Does that sound likely? Thanks, tom -- OBEY GIANT |
|
|
#2 |
|
|
> I'd like to fit a curve (a rectangular hyperbola, in fact) to > some data points as part of a program i'm writing. Can anyone > suggest a package which would help me do this? I use the LeastSquares function in Scientific Python: http://starship.python.net/~hinsen/ScientificPython/ > A bit of googling suggests that SciPy might be what i want. > Does that sound likely? Sure. -- Grant Edwards grante Yow! An air of FRENCH at FRIES permeates my visi.com nostrils!! |
|
|
#3 |
|
|
> On 2005-05-08, Tom Anderson <twic@urchin.earth.li> wrote: > > > I'd like to fit a curve (a rectangular hyperbola, in fact) to > > some data points as part of a program i'm writing. Can anyone > > suggest a package which would help me do this? > > I use the LeastSquares function in Scientific Python: > > http://starship.python.net/~hinsen/ScientificPython/ I'll check that out, cheers. > > A bit of googling suggests that SciPy might be what i want. Does that > > sound likely? > > Sure. I ended up using scipy.optimize.minpack.leastsq, and it works brilliantly. The interface is a bit awkward - it wants a function from a guess at the parameters to a list of residuals; i'd rather give it a function from parameters + x-coordinate to y-coordinate plus a set of points, and have it work out the residuals for me - so i wrote a little wrapper to make it suit me better, and now i'm cooking with gas. The only problem is that the optimisation doesn't converge, but i think that's probably a bug in my code! tom -- Punk's not ***ual, it's just aggression. |