Contents
We are working on the Hard Margin Optimization problem in Support Vector Machines, with canonical formula subject to for all , where are feature vectors, are class labels, is the normal vector of the separating hyperplane, and is the intercept. The domain is binary linear classification with linearly separable data, where no training misclassifications are allowed and the goal is to maximize the geometric margin.
Deep Breakdown
Hard Margin SVM is the cleanest and most idealized version of Support Vector Machine classification. It assumes the dataset is perfectly linearly separable, meaning there exists at least one hyperplane that classifies every training point correctly.
A hyperplane in dimensions is defined by:
where:
- determines the orientation of the boundary,
- shifts the boundary.
For classification, we predict:
- class if ,
- class if .
If the data is separable, many different hyperplanes may classify all points correctly. Hard Margin SVM does not choose just any separating hyperplane. It chooses the one with the largest margin, meaning the largest minimum distance from the boundary to any training point.
This is formulated as the optimization problem:
The objective is minimized because smaller corresponds to a larger geometric margin. The constraints ensure all points are correctly classified and lie on the correct side of the margin boundary.
Why this matters in DA/DS:
- Foundational model: it is the starting point for understanding soft-margin SVMs, hinge loss, and kernel SVMs.
- Maximum-margin principle: it introduces the idea that among all perfect separators, the most robust one is preferred.
- Convex optimization: the problem is a quadratic program with linear constraints.
- Support vectors: only a subset of training points determines the boundary.
- Generalization intuition: wider margin often improves out-of-sample robustness.
In practice, hard margin is rarely used directly because real business data almost always contains noise, overlap, or outliers. But conceptually it is the core from which the soft-margin SVM is built.