You can see that your covariance matrix has two eigenvalues that are almost
0, therefore the determinant of the precision (inverse covariance matrix)
degenerates to "infinity", which explain that the comparison fails.
I will try to add some code to catch this type of error and try to overcome
it.
Meanwhile, one possible workaround for you is to remove the features that
can be expressed as a linear combination of some others.
One other possibility is to try to reconstruct a (p-2)-dimensional dataset
from a PCA component selection (even though this is not robust to the
presence of outliers...) or any dimension reduction method.
I will keep you informed about the advance of my patch.
Best,
Virgile
Le 28 juin 2012 17:47, "ert" <[email protected]> a écrit :
np.dot(X.T, X) is invertible.
None of the features have a 0 variance and I don't think they are
correlated.
"Would you look at the eigenvalues of this thing please?"
I calculated the eigenvalues in the following manner. Sorry, I am not sure
if this is what you wanted me to do or what I should look for.
>>> print np.linalg.eig(np.dot(X.T,X))
array([ 6.98841511e+03, 3.74800914e+02, 1.91861359e+02,
1.60115903e+02, 1.43342111e+02, 1.32635349e+02,
1.05821870e+02, 1.04876518e+02, 9.35168895e+01,
8.17388838e+01, 7.32905453e+01, 6.78274062e+01,
3.00527208e+01, 3.49964917e+01, 3.54243068e+01,
4.34113226e+01, 5.59046873e+01, 4.89676135e+01,
5.16760071e-14, -4.21817181e-15])
From: Virgile Fritsch <[email protected]>
Sent: Thu, 28 Jun 2012 17:44:35
To: [email protected]
Subject: Re: [Scikit-learn-general] EllipticEnvelope giving error
IndexError: 0-d arrays can't be indexed
>
> It may come from the fact that np.dot(X, X.T) is not invertible.
I meant, of course, np.dot(X...
[image]
Follow Rediff Deal ho jaye! to get exciting offers in your city everyday.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general