For the kernel support vector machine objective , assume , , and that the kernel matrix is invertible. The subdifferential optimality equation givesThus strict margins greater than one force zero coefficients, while misclassified observations have nonzero coefficients. Invertibility matters: a singular kernel matrix allows coefficient changes in its null space without changing the fitted function or objective.
Kernel support vector machine Created 2026-10-06 Updated 2026-10-14
A kernel support vector machine trains a support vector machine using a positive-definite kernel instead of explicit feature coordinates. The kernel trick evaluates all required feature inner products through the training Gram matrix; prediction is . Nonzero dual coefficients identify support vectors. An unpenalized intercept supplies the dual equality . The Reproducing kernel Hilbert space construction explains why a positive-semidefinite kernel defines valid feature geometry.
Past exam of the mathematics course of the University of Cambridge 2014 iii Paper 65 5 Solution Created 2026-10-03 Updated 2026-10-14
A kernel support vector machine constructs a large-margin classifier in a feature Hilbert space. Given training points and labels , choose a feature map and an affine score . Prediction is the sign of the score. Normalizing the functional margin to one makes the closest separating geometric margin , and the full margin between the two supporting hyperplanes is . Maximizing that margin therefore minimizes .
For separable data, the hard-margin support vector machine primal isNoisy or nonseparable data use slack variables and the soft-margin support vector machine:Eliminating gives the equivalent hinge loss objective . The parameter balances margin size against violations; it is not a hard bound on their number. The bias is unpenalized here, which determines the equality constraint in the dual.
Attach multipliers to and to . The Lagrangian isStationarity gives , and . Eliminating yieldswhere is a positive-definite kernel, meaning positive semidefinite Gram matrices. The hard-margin dual is the same objective with only , without the upper bound. Soft-margin strict feasibility follows by taking and all , so strong duality and the Karush-Kuhn-Tucker conditions apply. For separable hard-margin data a separator can be rescaled to give strict margins, supplying the analogous qualification. Although the feature space may be infinite dimensional, projecting onto the finite span of the training feature vectors preserves scores and cannot increase its norm, so this optimization reduces to a finite span.
The complementary slackness relations arePoints with are support vectors. If , then and ; such a point gives . A point with can lie inside the margin or be misclassified, while contributes no term to . If no coefficient lies strictly between the bounds, an admissible bias must be obtained from the KKT inequalities, rather than dividing by a nonexistent margin vector. Bias and dual coefficients can be nonunique even when the optimal feature-space weight is unique.
The kernel trick operates both during training and prediction. The dual optimization uses only the Gram matrix , so the feature vectors need not be formed. Prediction likewise usesA nonlinear kernel therefore makes a linear separator in feature space represent a nonlinear boundary in input space. For example, on the degree-two polynomial kernel corresponds to . Gaussian kernels yield infinite-dimensional feature spaces. An arbitrary similarity is not automatically a valid kernel: for every finite collection and real coefficients , one needs . This makes the dual quadratic form positive semidefinite and the maximization concave.
Mercer's theorem gives a spectral realization under its additional analytic hypotheses. For a continuous symmetric positive-semidefinite kernel on a compact domain with a finite full-support measure, the integral operator is compact, self-adjoint and positive. The Mercer expansion iswith the standard uniform convergence conclusions under these hypotheses. Since , the nonlinear feature mapis well defined. This explains the connection of Mercer kernels to Hilbert space features, rather than treating the kernel trick as a purely formal substitution.
The finite-Gram positivity condition is more general than this compact-domain spectral theorem. Every such kernel generates a Reproducing kernel Hilbert space: on finite sums of kernel sections definequotient out zero-norm elements, and complete. The resulting space satisfies the reproducing property . Its canonical feature map is , whose inner product is exactly . A feature map need not be injective; calling it an embedding does not by itself prove distinct inputs remain distinct. The kernel support vector machine uses this geometry together with convex duality to fit and evaluate a maximum-margin classifier while accessing the geometry only through kernel evaluations.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 325 3 iii Solution Created 2026-10-03 Updated 2026-10-06
Write the objective as with . Each hinge loss is finite and convex, so the subdifferential sum rule applies without a qualification gap. Its subdifferential isThis formula also covers , if such a sample is allowed, because the loss is then constant. For a convex function, zero in the subdifferential is necessary and sufficient for global optimality. Thus is optimal exactly when there are weights such thatEquivalently, using and ,The notation denotes the segment between and , also when . This avoids reversing interval endpoints for negative-class samples.
Because , the objective is strongly convex, and makes it coercive. It is continuous, so a minimizer exists and is unique for every finite data vector . The weights at exact margins need not be unique even though is. These are the hinge-loss optimality weights for the one-dimensional support vector machine.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 218 4 b Solution 2026-10-03
The fitted LDA rule replaces by class proportions, class sample means, and the pooled within-class covariance, then maximizes the resulting . Means and covariances have unbounded sensitivity, so a gross outlier can substantially move every LDA boundary. A soft-margin linear support vector machine uses hinge loss; observations beyond the correctly classified margin cease contributing, though mislabeled or extreme points can still matter according to the penalty . Thus the SVM is generally more robust to well-classified extremes, while neither method is automatically robust to adversarial outliers.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 218 2 b Solution 2026-09-28
The support vector machine classifier isUnder the constraints, the two classes lie beyond the parallel support-vector-machine margin boundaries . Their distance is , so minimizing the norm maximizes the geometric margin. The observations touching the margin are the support vectors.
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 218 4 a Solution Created 2026-09-24 Updated 2026-09-25
For and , a linear support vector machine predictsOne penalized formulation minimizes empirical hinge loss plus a squared Euclidean norm penalty:Conventions often leave the intercept unpenalized, replacing by ; this does not change the role of the two terms.
Soft-margin support vector machine Created 2026-10-05 Updated 2026-10-06
For signed training labels, a linear soft-margin support vector machine minimizeswith . Its Karush-Kuhn-Tucker conditions give , , and .