LESSON 4.39 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW
Local Outlier Factor
Watch each point's density meet the density of its neighbors.
Needs4.38 One-class SVM
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 4.39 · DENSITY BAYGAPS: DENSE 0.09 · SPARSE 0.39 · 40: 1.00
01
Stage 1 of 6 · Two densities
Nearest gaps are about 0.09 in the dense cluster and 0.39 in the sparse one. One distance rule cannot fit both.
Explain it simply
Each point has a gap, the distance to its nearest point. In the dense cluster the gaps are tiny, about 0.09. In the sparse cluster they're about four times wider. So a point is odd only compared with the points around it.
40 points: a dense cluster of 24, a sparse cluster of 11 and points 36 to 40 apart. The median nearest gap is 0.09 in the dense cluster and 0.39 in the sparse cluster. Point 40 has a gap of 1.00.
pointslink to a neighbor, distance dneighbors k, k-distance, the 1.5 linereach distance, density and LOFflagged outlier
Toy: 4.37's 40 points · 2 clusters · 5 outliers
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The gap of a point is the distance to its nearest point.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 2 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.