[SciPy-User] covariance mtrix returns inf

alex argriffi at ncsu.edu
Fri Feb 7 23:12:17 EST 2014


> Message: 1
> Date: Fri, 7 Feb 2014 22:36:05 -0500
> From: josef.pktd at gmail.com
> Subject: Re: [SciPy-User] covariance mtrix returns inf
> To: SciPy Users List <scipy-user at scipy.org>
> Message-ID:
>         <CAMMTP+CkmJ2rvWfd4H_izZRqgtm=7Jid8nYq1Ytahxt5sRQt4g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Fri, Feb 7, 2014 at 9:58 PM, Gabriele Brambilla <
> gb.gabrielebrambilla at gmail.com> wrote:
>
>> Hi,
>> I am performing a fit with this code, and it fits well but at the end when
>> I try to print the covariance matrix it returns to me inf:
>>
>
> If you get an inf back, that means that the estimated covariance matrix is
> singular or not (strictly) positive definite.
> This can be because it's really singular, or because of numerical problems,
> bad scaling or because the numerical derivatives are not very good.
>
> If you have an analytical derivate it might help.
>
> Ecut looks much too large in scale compared to the other ones. Numerical
> derivative might be useless if it doesn't scale correctly, which I think it
> doesn't do.
>
> Josef
>
>
>
>>
>> def funk(x0, a, b, c, d):
>>
>>                 return a - b * x0 - log10(e)*((10**x0)/c)**b

Is that last b supposed to be d?  If d makes no appearance in this
function then d would have infinite uncertainty so this could make
your covariance matrix inf.



More information about the SciPy-User mailing list