Maximum-Margin Classification and Slack

Express distance to a separating hyperplane and see how slack trades margin width against violations.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Normalize the functional margin before comparing widths
  2. Slack allows points inside the margin or beyond the separator

Normalize the functional margin before comparing widths

For a hyperplane \(w^\top x+b=0\), the distance of a point to it is \(|w^\top x+b|/\|w\|_2\). Scaling \(w,b\) together leaves the separator unchanged. In a separable binary setup, choose the scale so constraints read \(y_i(w^\top x_i+b)\ge1\). The two supporting margin planes at scores \(+1,-1\) are separated by \(2/\|w\|_2\), so minimizing the norm widens the prescribed margin.

Slack allows points inside the margin or beyond the separator

A soft-margin model adds nonnegative slack \(\xi_i\), requiring the score at least \(1-\xi_i\) and penalizing total slack. Changing its penalty affects outliers and model flexibility. Scaling features changes distances and should be part of the training pipeline. Kernel feature maps can express the margin in a richer space. Logistic regression fits probabilities through a different loss.[1][2]

References

  1. Gareth James et al., An Introduction to Statistical Learning ↩
  2. Trevor Hastie, Robert Tibshirani and Jerome Friedman, The Elements of Statistical Learning ↩