LearnMachine learning

Support vector machine

Find the widest street between two groups, and see that only a few points on its edges really matter.

  • Machine learning
  • Supervised
  • Classification

Choose a colour and click to add points. Circled points are the support vectors; drag any point to see what moves the boundary.

How it works

The widest possible street.

A support vector machine separates two classes with the straight line that leaves the widest possible gap, the margin, on both sides. The dashed lines are the edges of that street.

Only the points touching or inside the street, the support vectors, decide where it goes. Every other point could move freely without changing the answer, which makes the model robust and compact.

Real data is messy, so the margin is allowed to be soft: C sets how much it cares about points on the wrong side. With kernels, the same idea draws curved boundaries, which made support vector machines a favourite before deep learning.