Lesson 6.5 · 10 min read · about 55 min to master at a very slow pace
Margins and Support Vectors
The geometry of the margin: distance from a point to the boundary, the margin width 2/‖w‖, what support vectors are, and a complete SVM solved by hand.
Geometry
- The decision boundary is the hyperplane .
- The two margin lines are and .
- The distance from a point to the boundary is .
- So the margin width (gap between the two margin lines) is . A wider margin means a smaller .
Support vectors
Support vectors are the training points lying exactly on the margin lines (and, in the soft-margin case, inside the margin or misclassified). They alone determine the solution: delete or move any other point, as long as it stays outside the margin, and the boundary doesn't change. That's why SVMs can be efficient and robust to points far from the boundary.
An SVM by hand
Negative support vector , positive support vector , other points further away. By symmetry, . Support vectors satisfy :
Subtract: , so and . Hence , .
, so margin width . Check: it equals the distance between the two support vectors, .
Classify : , so . Its distance to the boundary is . Because , it lies inside the margin.
Margin from a given
, : , margin width . Point : , class , distance , outside the margin since .
Cheatsheet
SVM geometry
Support vectors
SVM by hand (2 support vectors)
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.