[SciPy-user] scipy.optimize.leastsq and covariance matrix meaning
Thu Nov 6 09:10:32 CST 2008
I have a trouble with the covariance matrix in the output of
scipy.optimize.leastsq . I am trying to find the estimated sigma of the
parameters obtained by the fit. Please bear with me since my statistics
knowledge is poor. I understand that the diagonal of the covariance
matrix should return me the variance values of each parameter.
1) The variance of such parameters look unreasonably large to me,
despite the fact I obtain an *excellent* fit over a lot of data points
(and values extremly well coherent with expected).
2) The non-diagonal values of the covariance are also unreasonably
large, which lets me doubt that picking simply the diagonal values is
the correct thing to do.
The residuals function is:
Calculates the residuals of the fit
err = y-( (therm*pii/4) * (((1-(x*lambd))**-2) - 1 +
For example, a common entity of values is:
and the relative covariance matrix is
[[ 1.97019986e+29 -2.67163157e+33]
[ -2.67163157e+33 3.78415451e+37]]
...which concerns me.
Massimo Sandal , Ph.D.
University of Bologna
Department of Biochemistry "G.Moruzzi"
Via Irnerio 48, 40126 Bologna, Italy
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 274 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20081106/23fa5d08/attachment.vcf
More information about the SciPy-user