-3

I want to catch outliers in the 16 x 224 array by using the Elliptic Envelope from sklearn. The problem is that when I predict the array, it gives me different dimension:

ell = EllipticEnvelope()
ell.fit(c)
b = ell.predict(c)

C is 16 x 224 as I said before, and the "b" is size 16 x 1.

1 Answers1

1

It is the expected behavior.

Quoting the docs, predict method returns:

is_outliers : array, shape = (n_samples, ), dtype = bool

For each observation, tells whether or not it should be considered as an outlier according to the fitted model.

Note that the goal of outlier detection is to identify samples (rows) that are potential outliers.

Jan K
  • 4,040
  • 1
  • 15
  • 16