[SciPy-User] Return sigmas from curve_fit

Gökhan Sever gokhansever at gmail.com
Tue Oct 16 15:32:47 EDT 2012


Thanks Travis.

That doesn't indeed, I missed the part that part of the curve_fit return
was variance of the estimate(s).

I am comparing IDL's curvefit and Scipy's curve_fit, and got slightly
different results for the same data using the same fit function. I guess
IDL's result is slightly wrong when the default tol value is used (The
default value is 1.0 x  10-3.) comparing to the SciPy's default ftol
of 1.49012e-08.

On Tue, Oct 16, 2012 at 12:11 PM, Travis Oliphant <travis at continuum.io>wrote:

> If I understand your question, then taking the square root of the diagonal
> elements of the second return from curve_fit.
>
> np.sqrt(pcov.diagonal())
>
> Should give you the standard deviations...
>
> -Travis
>
> On Oct 16, 2012, at 1:07 PM, Gökhan Sever wrote:
>
> Hello,
>
> Is there a way to return standard deviations of the best fit parameters
> from curve_fit like in IDL's curvefit function?
>
>
> PS:
>
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html
> http://www.exelisvis.com/docs/CURVEFIT.html
>
> --
> Gökhan
>  _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>


-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20121016/def6a922/attachment.html>


More information about the SciPy-User mailing list