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

One-class SVM

Watch kernel bumps build a fence around normal points and leave outliers outside.


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.38 · ONE-CLASS BAY40 POINTS · ν = 0.2 · AT MOST 8 OUTSIDE
01
Stage 1 of 6 · One class
A one-class SVM draws one boundary around 40 unlabeled points. With ν = 0.2, at most 8 may end outside.
Explain it simply

You see 40 points and no labels. Most sit in two clusters, and five sit apart. The one-class SVM learns where normal points live and puts a fence around them. The setting ν is the share of points allowed outside the fence: here at most 8 of 40.

40 points on a plane: a dense cluster, a sparse cluster and 5 points apart. A grid of 40 squares marks 8 that may end outside.

pointsweight α, cut ρ, ν, γscore f, the boundary, points on itoutside the boundarykernel bump K
−3−2−101234−2−1012x₁x₂363738394040 points, no labelsbudget: νn = 8 of 40at most νn = 0.2 × 40 = 8 may end outsidethe other 32 stay inside the boundaryone square per pointν = 0.2, n = 40: at most νn = 8 points end outsidethe SVM sees only the points: no labels, no outliers marked−3−2−101234−2−1012x₁x₂363738394040 points, no labelsbudget: νn = 8 of 40at most νn = 0.2 × 40 = 8 may end outsidethe other 32 stay inside the boundaryone square per pointν = 0.2, n = 40: at most νn = 8 points end outsidethe SVM sees only the points: no labels, no outliers marked
Toy: 40 points · 2 clusters · 5 outliers · seeded
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
#outside≤ν n\#\text{outside} \le \sy{nu}{param}{\nu}\, \sy{n}{data}{n}
νn=0.2⋅40=8\nu n = 0.2 \cdot 40 = 8

At most a share ν of the points may end outside.

Common mix-ups

MYTHν is the exact share of points the model flags.

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

Predict, then reveal
3 CHECKS · PRO
Q01At ν = 0.5, scikit-learn's default, how many of the 40 points end outside?

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.