[SciPy-User] optimize.leastsq hessian approx. inversion?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

[SciPy-User] optimize.leastsq hessian approx. inversion?

Udo Hoefel

I'm currently using scipy.optimize.leastsq to do a fit, to get to the
covariance matrix, I use
self.s_sq =
self.pcov = cov_x*self.s_sq
wherein self.Max_Dist_Between_Dips = Number of Datapoints and
(2*(max(self.Channel_List)-1)+1) the number of free parameters.
This is according to the documentation, I believe (and one question
here, https://mail.scipy.org/pipermail/scipy-user/2013-March/034316.html )
My (probably stupid) question is the following:
As I understand, cov_x is the unscaled Hessian, right?
Shouldn't I have to invert it at some point, to get to the Covariance?
My guess would have been something like
self.pcov = self.s_sq*np.linalg.inv(cov_x)

Big thanks in advance for any hint,
SciPy-User mailing list
[hidden email]