[SciPy-user] leastsq not converging with tutorial example

Kael Fischer kael.fischer at gmail.com
Tue Oct 25 16:55:27 CDT 2005


When running the leastsq example form the tutorial, the data are not
fit and the starting parameters are returned.  Looking a little

>>>  leastsq(residuals, p0, args=(y_meas, x),full_output=True )
([  8.        , 43.47826087,  1.04719755,], {'qtf': [ -1.69473087e+02,
-4.72325042e+02,  2.13172580e+07,], 'nfev': 4, 'fjac':
[[...blah...blah...blah...]], 'ipvt': [1,2,3,]}, 4, 'The cosine of the
angle between func(x) and any column of the\n  Jacobian is at most
0.000000 in absolute value')

I get the same behavior if I change the starting parameters, or if fit
other systems (like first order decay)

OS:  FreeBSD 5.4
Python: 2.3.4
scipy_version: 0.3.2

Any ideas about getting this to work?


Kael Fischer, Ph.D
DeRisi Lab - Univ. Of California San Francisco

More information about the SciPy-user mailing list