liveBook · Manning

Angle-based outlier detection

As explained in Outlier Detection in Python

Angle-based outlier detection is an outlier-detection algorithm that evaluates observations using the variation of angles formed with pairs of other observations, with distance playing a secondary role.

Angle-based outlier detection (ABOD) identifies unusual observations by measuring how much angles vary between each observation and pairs of other observations. Central points produce widely varying angles; points outside the main data body produce more consistent angles. Distances contribute secondarily, helping distinguish strong outliers when angle variation alone is similar. section 6.5

A practical ABOD interpretation follows these steps:

  • For each point, form angles with every pair of other points and assess the variation of those angles. section 6.5
  • Treat large angular variation as evidence of centrality and narrow variation as evidence of an outlying position. section 6.5
  • Use distance as a minor additional signal when similarly varying angles do not separate outliers clearly. section 6.5
  • Account for computational cost: the full method is O(n3), while fastABOD samples the data to reduce the workload. section 6.5
Figure 6.11 The idea behind ABOD is shown with a 2D dataset. ABOD works by, for each point, finding the angle between it and every other pair of points. Inliers will have a large variance of angles, while outliers will have a narrow variance of angles. The left and middle pane show two angles formed around point A in the center of the data. This point is the center of angles with a diverse range of sizes. The right pane shows an example of an angle formed around an outlier point, point B. The set of angles formed with this point at the center will have a small range of sizes.

A two-dimensional geometric illustration contrasts a central point with diverse angle sizes against an outlier with narrowly varying angles. section 6.5

How Outlier Detection in Python covers it

How deep it goes
Explains geometric intuition, secondary distance use, O(n3) computation, and fastABOD sampling without deriving the full formula.
Examples
Uses a two-dimensional figure contrasting central point A, edge points, and external point B through their angle distributions.
What you can do after
Apply ABOD by comparing each observation’s angular variation, then account for distance and computational cost when interpreting results.
How it connects
Connects angle variation with distance measures, the curse of dimensionality, LOF, fastABOD, and cluster-specific outlier testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.