Log inStart free
LESSON 4.37 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Isolation Forest

Watch random cuts isolate outliers in a few steps and crowded points in many.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 4.37 · ISOLATION BAY40 POINTS · NO LABELS · WIDEST GAP 17%
01
Stage 1 of 6 · Few and different
An isolation forest looks for outliers in 40 points without labels. Two clusters hold 35 of them.
Explain it simply

Most points sit in two groups: a tight dense cluster and a loose sparse one. Five points sit far from both, and nobody marked them. The two strips show each feature alone. The outliers sit at the ends, behind wide empty gaps.

40 points in a plane. A dense cluster holds 24 points, and a sparse cluster holds 11. Points 36 to 40 are 5 outliers. The widest gap on x₁ is 17% of its range.

pointspoint the tree did not drawcut, sample size ψ, trees T, the 0.5 linepath length and scoreflagged outlierisolation tree
−3−2−101234−2−1012x₁x₂dense cluster · 24sparse cluster · 11363738394040 points, no labelseach feature alonex₁widest gap: 17% of cuts on x₁range 7.30−3.104.20x₂widest gap: 11% of cuts on x₂range 5.10−2.502.60widest gaps: x₁ 1.24 of 7.30 = 17% · x₂ 0.56 of 5.10 = 11%a random cut lands in a gap as often as the gap is wide−3−2−101234−2−1012x₁x₂dense cluster · 24sparse cluster · 11363738394040 points, no labelseach feature alonex₁widest gap: 17% of cuts on x₁range 7.30−3.104.20x₂widest gap: 11% of cuts on x₂range 5.10−2.502.60widest gaps: x₁ 1.24 of 7.30 = 17% · x₂ 0.56 of 5.10 = 11%a random cut lands in a gap as often as the gap is wide
Toy: 40 points · 2 clusters · 5 outliers · seeded
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
xi=(xi1, xi2),i=1,…,40\sy{x}{data}{x_i} = (x_{i1},\ x_{i2}),\qquad i = 1, \dots, 40
x37=(−3.10, 2.30)x_{37} = (-3.10,\ 2.30)

Each point has two features and no label.

Common mix-ups

MYTHOne isolation tree is enough to rank the points.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01In tree 1, which point needs more cuts: outlier 37 or dense point 15?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 3 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.