[SciPy-user] Optimization Working only with a Specific Expression of the input Parameters
Sat Mar 3 18:17:51 CST 2007
Lorenzo Isella wrote:
> Actually I already posted this on the mailing list, but nevertheless I
> will give it another try.
Sorry I have not seen it.
The problem is as you guessed that leastsq is trying negative parameters which
will turn the residual complex. But the reason is simple and easy to solve: your
initital guess for the first parameters is bad:
> print "the initial guesses are"
> p0 = [50000.0,90.0, 1.59]
If you set it to 1e8 it works very well.
More information about the SciPy-user