Interactive notebook
SVM & the Kernel Trick
Why the widest street between classes generalizes — and how kernels make one exist.
Add points as:
- Class A
- Class B
- Margin
Drag a circled point — those are the support vectors. Move one and the boundary follows; move any other point and nothing happens at all. The plot also supports arrow-key editing.
The SVM doesn’t just find a separating line, it finds the one with the widest empty street between the classes. Only the points touching that street matter — everything else could be deleted without changing the answer. Lowering C makes the model tolerate violations in exchange for a wider margin; raising it forces a tighter fit around awkward points.