New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying absolute errors in curve_fit #3098
Conversation
The documentation says pcov is a matrix, so it may be confusing to have it be a scalar in some pathological cases.
Yes, I like returning the not available pcov in the correct shape better. |
ENH: optimize: specifying absolute errors in curve_fit An option absolute_sigma is added to scipy.optimize.curve_fit, to accommodate the common cases: - sigma = relative weights, pcov variance estimated from data - sigma = one standard deviation errors on ydata, determines pcov variances Also, make the returned pcov always be a 2D array. In indeterminate cases, it used to return a scalar, which may not be desirable.
Ok, no objections, so merging. |
While people are modifying curve_fit, how about improving the docstring? Right now, it has a rather misleading example that works without providing initial guesses only because all the fitting parameters are close to one, the default values. I think users would benefit greatly from seeing an example that needs good initial guesses. I would be happy to work on this if no one else wants to. |
@djpine: an improved the docstring would be welcome. If you already know how it should be improved, please go ahead. |
This reminds me about the starting values. If we change them slightly from 1.0 we avoid the list confusion, issue ??? |
I would suggest to make the starting values a necessary argument. Giving it a default of one is probably a big source of bugs. |
I agree. David Pine Center for Soft Matter Research Office: 601 Meyer Mailing address: E-mail: pine@nyu.edu On Wed, Dec 4, 2013 at 10:12 PM, Till Stensitzki
|
Continued from gh-448
An option absolute_sigma is added to scipy.optimize.curve_fit, to accommodate the common cases:
Also, make the returned
pcov
always be a 2D array. In indeterminate cases, it used to return a scalar, which may not be desirable.