椭圆包络异常值检测

Elliptic Envelope outlier detection

我想通过使用 sklearn 中的椭圆包络来捕获 16 x 224 数组中的异常值。问题是当我预测数组时,它给了我不同的维度:

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

C 就是我之前说的 16 x 224,"b" 的大小是 16 x 1。

这是预期的行为。

引用 docspredict 方法 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.

请注意,离群值检测的目标是识别 样本 (行)是潜在的离群值。