>
> It may come from the fact that np.dot(X, X.T) is not invertible.
>
I meant, of course, np.dot(X.T, X).
Would you look at the eigenvalues of this thing please?
On Thu, Jun 28, 2012 at 10:33 AM, Virgile Fritsch <[email protected]
> wrote:
> Hi,
>
> It may come from the fact that np.dot(X, X.T) is not invertible.
> Is it possible that two (or more) features are correlated? Or that one (or
> more) features have a 0 variance?
> If yes, try to remove those features.
>
> Let us know if you think this could be the reason why it fails.
>
> Virgile
>
>
> On Thu, Jun 28, 2012 at 1:08 AM, ert <[email protected]> wrote:
>
>> Hi,
>>
>> I am trying to use EllipticEnvelope for outlier detection but it results
>> in an error when trying to use the m.fit(X) function (stacktrace below).
>> Here
>> m = EllipticEnvelope(contamination=0.1)
>>
>> X.shape gives output
>> (731, 22)
>> X is not a sparse matrix.
>>
>> Initially, I thought there was some prob with my X, however
>> m = OneClassSVM()
>> m.fit(X)
>> runs fine without any errors. I am not sure if these are related.
>> Any idea what could be causing this?
>>
>> StackTrace (note 'instances' is a list of lists):-
>> Traceback (most recent call last):
>> File "create_classifier_new.py", line 274, in <module>
>> m.fit(numpy.array(instances))
>> File
>> "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.12_git-py2.6-linux-x86_64.egg/sklearn/covariance/outlier_detection.py",
>> line 176, in fit
>> MinCovDet.fit(self, X)
>> File
>> "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.12_git-py2.6-linux-x86_64.egg/sklearn/covariance/robust_covariance.py",
>> line 513, in fit
>> random_state=self.random_state)
>> File
>> "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.12_git-py2.6-linux-x86_64.egg/sklearn/covariance/robust_covariance.py",
>> line 360, in fast_mcd
>> random_state=random_state)
>> File
>> "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.12_git-py2.6-linux-x86_64.egg/sklearn/covariance/robust_covariance.py",
>> line 228, in select_candidates
>> random_state=random_state))
>> File
>> "/usr/local/lib/python2.6/dist-packages/scikit_learn-0.12_git-py2.6-linux-x86_64.egg/sklearn/covariance/robust_covariance.py",
>> line 120, in c_step
>> if np.allclose(det, previous_det):
>> File "/usr/lib/python2.6/dist-packages/numpy/core/numeric.py", line
>> 1671, in allclose
>> if not all(x[xinf] == y[xinf]):
>> IndexError: 0-d arrays can't be indexed
>>
>>
>> Thanks
>>
>>
>>
>> <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?>
>> Follow *Rediff Deal ho
>> jaye!<http://track.rediff.com/click?url=___http://dealhojaye.rediff.com?sc_cid=rediffmailsignature___&cmp=signature&lnk=rediffmailsignature&newservice=deals>
>> * 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