[SciPy-User] [SciPy-user] Covariance matrix

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Feb 13 11:04:23 EST 2012


On Mon, Feb 13, 2012 at 10:56 AM,  <josef.pktd at gmail.com> wrote:
> On Sat, Feb 11, 2012 at 7:39 PM, Kevin Gullikson
> <kevin.gullikson at gmail.com> wrote:
>> Use full_output=True when you call leastq, and you will get a matrix (among
>> other things). If you multiply that matrix by the standard deviation of the
>> residuals, it will be the covariance matrix.
>
> As Charles pointed out, multiply by the error variance not the
> standard deviation. Docstring is wrong in this.

I finally fixed this
http://docs.scipy.org/scipy/docs/scipy.optimize.minpack.leastsq/diff/6184/7387/

Josef
>
> Josef
>
>>
>> Kevin Gullikson
>>
>>
>>
>>
>> On Fri, Feb 10, 2012 at 10:11 AM, suzana8447 <k-assem84 at hotmail.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?
>>>
>>> Thanks in advance.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Covariance-matrix-tp33301423p33301423.html
>>> Sent from the Scipy-User mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> SciPy-User mailing list
>>> SciPy-User at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>



More information about the SciPy-User mailing list