MACHINE LEARNING / CLASSIFICATION

SUPPORT VECTOR MACHINE

Find the widest possible margin between classes and let support vectors define the boundary.

SupervisedClassificationKernel-based
Saved only in this browser

01 Overview

02 The Problem

SVM seeks a boundary that separates classes while leaving the widest possible margin around that boundary. Points nearest the margin become the support vectors.

03 Why It Matters

Maximising margin controls model complexity and can generalise well in high-dimensional spaces, especially when a useful kernel or linear boundary exists.

04 Intuition

Imagine a street between two groups. The best street is as wide as possible; only the houses touching its edges determine its position.

05 Mathematical Foundation

The soft-margin objective balances a small weight norm against hinge-loss penalties for points inside the margin or on the wrong side.

06 The Equation

\[J(w,b)=\frac{1}{2}\|w\|^2+C\sum_i\max(0,1-y_i(w^Tx_i+b))\]
  • \(w^Tx+b=0\) separating hyperplane
  • \(C\) penalty for margin violations
  • \(y_i\) class label in \(\{-1,+1\}\)

07 How It Learns

  1. Start with a separating score.
  2. Measure hinge-loss violations.
  3. Update weights by gradient steps.
  4. Stop when the margin and loss stabilise.

08 Algorithm

Labelled points
↓
Hinge-loss gradient
↓
Maximum-margin boundary

09 Visual Explanation

A quick visual summary of how this model sees data and makes its prediction.

10 Worked Example

A boundary with a larger geometric margin can be preferable even when several separating boundaries classify the training points correctly.

11 Data & Features

12 Evaluation

13 Strengths

14 Limitations

15 When to Use

16 When Not to Use

17 Real-World Applications

19 60-Second Recap

20 Continue Learning