[SciPy-User] Trouble using curve_fit

klo uo klonuo@gmail....
Mon Jan 9 13:28:51 CST 2012


On Mon, Jan 9, 2012 at 8:07 PM, Robert Kern <robert.kern@gmail.com> wrote:

> The initial parameters often matter a lot, particularly when
> exponentials are involved. The default is just (1, 1, 1). If you start
> with a negative initial value for `a`, then you will converge to the
> right answer better. Try this:
>
>  popt, pcov = curve_fit(func, x, y, [-1, 1, 1])
>
>
That, just perfect :)

Thanks for your fast reply and explanation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120109/9c9bc489/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 22388 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20120109/9c9bc489/attachment-0001.png 


More information about the SciPy-User mailing list