Closed
Description
What are the minimum number of samples (n0) and features (n1) required to use MinCovDet? To me, this method should be feasible for n0 >= 3. However, I get an exception for (n0,n1) = (3,1). The error does not occur for (3,2) or for (4,1). I suspect this issue has to do with an array being autocast to a lower-rank object.
import numpy as np
import sklearn.covariance
n0,n1 = (3,1)
x = np.random.normal(size=(n0,n1))
model = sklearn.covariance.outlier_detection.MinCovDet()
model.fit(x)
Yields the following error:
robust_covariance.pyc in fast_mcd(X, support_fraction, cov_computation_method, random_state)
--> 337 halves_start = np.where(diff == np.min(diff))[0]
ValueError: zero-size array to minimum.reduce without identity