Support vector machine foundations¶
Support vector machines construct a decision rule from a subset of training observations called support vectors. This chapter derives the linear maximum-margin classifier, introduces the kernel representation, and then gives the primal, dual, and decision functions for the three model families supported by MISTIC.
From a separating plane to maximum margin¶
For binary labels \(y_i\in\{-1,+1\}\), a linear classifier uses
Multiplying \((\mathbf{w},b)\) by a positive constant does not change the plane \(f(\mathbf{x})=0\). We therefore choose a canonical scaling in which the nearest observations obey \(y_i(\mathbf{w}^{\mathsf T}\mathbf{x}_i+b)=1\). The two supporting planes are \(f(\mathbf{x})=+1\) and \(f(\mathbf{x})=-1\). Their perpendicular distance is \(2/\lVert\mathbf{w}\rVert\), so maximizing the margin is equivalent to minimizing \(\frac12\lVert\mathbf{w}\rVert^2\).
Gold rings mark support vectors: the observations that constrain the margin. Non-support vectors do not appear in the final kernel expansion.
Perfect separation is often impossible. Slack variables \(\xi_i\geq 0\) permit margin violations, and \(C\) controls their penalty. This gives the soft-margin primal problem [1]:
The map \(\phi\) is written explicitly because the same derivation applies in a transformed feature space.
Lagrange multipliers and the classification dual¶
Introduce multipliers \(\alpha_i\geq0\) for the margin constraints and \(\mu_i\geq0\) for nonnegative slack. Stationarity of the Lagrangian gives
Substituting these conditions removes \(\mathbf w\), \(b\), and the slack variables, yielding the SVC dual:
Only observations with \(\alpha_i>0\) are support vectors. If \(\beta_i=\alpha_i y_i\), the decision function is
The kernel trick¶
The dual uses transformed observations only through inner products \(\phi(\mathbf{x}_i)^{\mathsf T}\phi(\mathbf{x}_j)\). A kernel evaluates that inner product directly,
without explicitly constructing the possibly high-dimensional coordinates. The optimization remains a linear maximum-margin problem in feature space even when its boundary is nonlinear in the original inputs. MISTIC computes these kernel matrices so it can recompute them after adding or removing feature groups.
Support vector regression¶
SVR replaces the classification margin with an \(\varepsilon\)-insensitive tube around a regression function [2]. Deviations inside the tube have zero loss. The primal is
subject to
With one multiplier for each side of the tube, the dual becomes
Writing \(\beta_i=\alpha_i-\alpha_i^*\), the prediction function is
MISTIC’s regression score combines squared Pearson correlation with nonnegative R-squared and also reports root mean squared error. Interpret errors and explanations in the units of the modeled target, including any target transformation.
One-class SVM¶
A one-class SVM estimates a region containing most of an inlier distribution [3]. It separates mapped observations from the origin. Its primal is
The dual is
and the signed decision function is
MISTIC and scikit-learn use \(+1\) for inliers and \(-1\) for novelties. Positive decision values lie on the learned inlier side. The choice of inlier population changes the scientific question, preprocessing, fitted region, and explanations.
Connecting the three models¶
All three decision functions have the common sparse form
where \(\mathbf{k}(\mathbf{x})\) contains kernels between support vectors and \(\mathbf{x}\). The meanings of \(\boldsymbol\beta\) and \(b_0\) differ by model, but the shared form is what permits MISTIC’s kernel perturbations and analytical gradients.