A local outlier is unusual relative to comparable nearby records, even though it resembles them more than it resembles the dataset as a whole. A global outlier, by contrast, is distinct from most records and may represent a different type of item. The distinction is clearest in data with at least two dimensions, although clustered one-dimensional data can also raise it. section 2.7
Unusual within a familiar type
Among pictures mostly showing dogs, cats, and hamsters, a dog photographed at an unusual angle is a local outlier; a parrot is a global outlier. In transaction data, an unusual purchase can be local relative to other purchases, while a rare type of transaction can be global. section 2.7
Figure 2.17 Point A is a local outlier and point B is a global outlier. Point A appears to be the same type of record as the cluster it is near but is distinct from it, while point B is not comparable to other points at all.
The diagram contrasts a point distinct from its nearby cluster with a point distinct from the dataset more broadly. section 2.7
When clusters meaningfully represent different record types, a point near a cluster’s edge can be treated as a local outlier. Comparing it with its own cluster may be more useful than comparing it with unrelated clusters. This depends on finding meaningful clusters; neighborhood-based methods instead compare records with nearby points. Detector choice and parameter tuning affect which kind of outlier is flagged, and some cases lie between local and global. section 3.2.3 section 2.7
Do not confuse *local* with *internal*. An internal outlier is a rare value within the overall range of a distribution, such as a purchase near $100 when purchases usually cluster near $10 or $500. Histograms, kernel density estimation, and nearest-neighbor calculations can find sparse regions within a single feature; being internal does not by itself establish that a record is locally unusual relative to comparable records across features. section 2.1.6 section 2.7
