An elliptic envelope detects outliers by fitting a robust, covariance-based elliptical model around a dominant data cluster. It measures each point with distances that account for feature variances and correlations, rather than treating dimensions independently. The estimator uses a robust covariance estimate, specifically MCD, and Mahalanobis distances to flag points substantially outside the fitted ellipse. section 5.5 section 5.5.2
Use an elliptic envelope when:
- The observations form one well-defined cluster rather than several distinct clusters. section 5.5.2 section 5.8
- Feature correlations and unequal variances make plain Euclidean distance misleading. section 5.5
- The features are reasonably close to Gaussian, especially when working with a carefully selected subset. section 5.5.2
- Avoid treating its predictions as universally reliable: higher dimensions make its distributional assumptions harder to satisfy, and multiple detectors may be useful. section 5.0 section 5.5.2
scikit-learn implementation
Fit EllipticEnvelope on selected features, call predict, and map its output of -1 and 1 to anomaly and inlier labels for visualization. A two-feature OpenML dataset shows the method flagging fringe points around a single cluster. On the KDD Cup data, the detector achieved an AUROC of 0.77 in the reported comparison. section 5.5.2
Figure 5.6 The middle pane is an example of using Euclidean distance from the center of a dataset to measure the outlierness of datapoints. Here, point A is a stronger outlier than point B but is the same distance from the center using Euclidean distance. The right pane is an example using distances based on fitting an ellipse to the data and provides more meaningful distance measures, allowing us to consider A farther from the center than B.
Compare Euclidean distance with ellipse-based distance: correlated, skewed data can make a point appear more anomalous under the fitted shape than under distance from the center alone. section 5.5
