[SciPy-user] leastsq not converging with tutorial example

Matt Fishburn fishburn at MIT.EDU
Wed Oct 26 01:34:52 CDT 2005


Kael Fischer wrote:
> Hi:
> 
> When running the leastsq example form the tutorial, the data are not
> fit and the starting parameters are returned.  Looking a little
> deeper....

I've used the leastsq algorithm to fit to general degree polynomials and 
an erf function before - see code at:

http://web.mit.edu/fishburn/www/021/funcFit.py

I haven't tried a cosine fit, though - do you have more in-depth code, 
or did you just grab the code from the tutorial?  I've had pretty good 
luck with leastsq.

-Matt Fishburn



More information about the SciPy-user mailing list