[SciPy-User] [SciPy-user] Covariance matrix
Mon Feb 13 02:59:20 CST 2012
I have an additional question to that below.
how can I do a matrix multiplication of a matrix X with shape: (240001, 4)
M = X * X.H
when I do this I get the following:
return N.dot(self, asmatrix(other))
ValueError: array is too big.
What is the best way to avoid this error?
Thanks in advance,
> On Fri, Feb 10, 2012 at 9:11 AM, suzana8447 <firstname.lastname@example.org
> <mailto:email@example.com>> wrote:
> Hello every body,
> I am using least square fit to fit some function to a given data.
> The fit is
> perfect with leastsq. Now, I need to calculate the covariance
> matrix whereby
> the diagonal terms represent the variances for the parameters.
> I need to know, if possible, how to extract the covariance matrix from
> leastsq. If there is no way to extract it, Are there any good
> methods that
> can be used to calculate the covariance matrix with high precision?
> If you pass the optional argument full_output=1 when calling leastsq
> the (scaled) covariance matrix will be returned in the slot after the
> solution. It needs to be multiplied by an estimated measurement
> variance determined from the residuals or by some other method. The
> documentation isn't quite right on that score, it says standard
> deviation. The computation of the covariance probably isn't the best
> numerically as its triangular factors are multiplied before inversion,
> rather than vice-verse. Patches welcome ;)
> SciPy-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User