Subspace outlier detection (SOD) finds observations that are unusual in a small, relevant subset of features rather than across the full feature space. This helps when additional dimensions obscure an anomaly or introduce irrelevant variation. section 6.10
For each point, SOD builds a reference set of neighbors using shared nearest neighbors (SNN): points generated by the same mechanism should share many neighbors, even when Euclidean distance is unreliable in high-dimensional data. section 6.10
Figure 6.14 The left pane shows point A in a 2D dataspace. The point is unusual considering feature A but not if using Euclidean distances in the full 2D dataspace. Using additional features can be counterproductive. In the middle and right panes, we see another point, point B, which is an outlier in the C–D subspace but not in the E–F subspace. We need only features C and D to identify this outlier.
A two-dimensional example shows why a point can be anomalous in one feature while appearing typical in a larger space, and why another anomaly may depend specifically on the C–D subspace. section 6.10
Detecting an injected relationship anomaly
A 100-by-35 synthetic dataset makes features 8 and 9 related, then inserts an unusual point with values 3.5 and −3.8 in those features. PyOD's SOD, configured with ref_set=3 and contamination=0.01, ranks that otherwise typical point as the top outlier. section 6.10
