Replies: 2 comments 14 replies
-
Hi Andrea,
the covariance matrix is returned by SciPy when using the methods “leastsq” or “least_squares”. So you’ll have to convince SciPy to not calculate that; it seems at least for the “leastsq” method that you can suppress the calculation and return by setting “full_output=0”; see https://github.com/scipy/scipy/blob/92d2a8592782ee19a1161d0bf3fc2241ba78bb63/scipy/optimize/_minpack_py.py#L479
You can pass that option to the solver when you initialize the Minimizer class ; check the documentation and/or examples for more information.
Hope that helps,
Renee
… On Dec 6, 2024, at 2:02 PM, Andrea Giunto ***@***.***> wrote:
At the moment, from the documentation it seems that it is not possible to turn off the calculation of the covariance matrix at the end of a fitting process for the least square methods. This increases significantly the fitting time when your model has tens of parameters, and it would be desirable to be able to turn this option off.
The calc_covar = False option is already there, but it works only for fitting methods other than least squares. Any suggestion on this? Thanks!
—
Reply to this email directly, view it on GitHub <#977>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC45CIDPXNOADA6MGBSIYBT2EHYD5AVCNFSM6AAAAABTFHPUXCVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGYZDKMJQHE>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
@Andrea-gm @reneeotten Yes, to be clear, I don't see any reason to use The added runtime from Why is squeezing ultimate performance for any individual fit a higher priority than estimating uncertainties? |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment, from the documentation it seems that it is not possible to turn off the calculation of the covariance matrix at the end of a fitting process for the least square methods. This increases significantly the fitting time when your model has tens of parameters, and it would be desirable to be able to turn this option off.
The calc_covar = False option is already there, but it works only for fitting methods other than least squares. Any suggestion on this? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions