Support vector machines
A linear SVM fixes a scale for the score and then maximises geometric separation. Keep functional margin, one-sided distance and full margin width separate. Kernel SVMs apply the same construction in a feature space.
6.1 Hyperplanes and hard margins
Past papers · DA 2024–2026 (3 papers): 3 questions, 5 marks
Let , with and . Classify by the sign of ; boundary ties follow the specified convention. A dataset is strictly linearly separable if every for some .
The hard-margin problem is feasible only for strictly separable data. At optimum, points on are margin points. Points with positive dual coefficient are support vectors; in degenerate cases a margin point can have zero coefficient in a particular dual optimum. In ordinary geometry questions, identify all points on the supporting planes and note any degeneracy.
Two finite classes are strictly separable exactly when their convex hulls are disjoint. XOR-labelled opposite corners of a square fail this test. A drawing can suggest a separator, but check every point's signed score.
Canonical boundary and the two supporting planes; the blue segment is the full margin width.
6.2 Slack variables and hinge loss
Soft margins allow violations of the unit functional margin. Let be the penalty weight and be the slack of observation .
| Minimum slack | Point position |
|---|---|
| On or beyond the correct supporting plane | |
| Correct side of boundary, inside margin | |
| On decision boundary | |
| Wrong side of boundary |
Larger penalises violations more strongly relative to coefficient norm. It corresponds to weaker regularisation, whereas larger ridge gives stronger regularisation. Large does not make nonseparable data separable.
6.3 Dual coefficients and kernels
Let be a kernel induced by a feature map . A valid real kernel has symmetric positive-semidefinite Gram matrices for all finite input sets.
The complementary-slackness conditions are and . Thus implies ; implies ; permits . Equality can occur in degenerate cases. Only positive-coefficient examples contribute to prediction.
| Kernel | Expression | Sufficient parameter conditions |
|---|---|---|
| Linear | Real vectors | |
| Polynomial | , integer | |
| Gaussian RBF | ; also for width |
Kernel values use consistent scaled inputs; the RBF exponent is dimensionless. A symmetric similarity matrix alone does not establish positive semidefiniteness.
Last-minute recall
- Check all signed scores when testing separability.
- Canonical supporting planes have scores and .
- Full margin width is twice the one-sided margin.
- A slack between zero and one is not a misclassification.
- Positive dual coefficients identify contributing support vectors.
- The bias equality needs a free support vector in the soft-margin case.
- Kernelisation replaces inner products, not class labels or the intercept constraint.