Overview

8 Learning to generalize: Vladimir Vapnik and support vector machines

Temperature readings appear along a single horizontal axis, increasing from left to right. Circles represent safe conditions, and squares represent unsafe conditions. The vertical dashed line is the decision boundary. The nearest observation on each side is a support vector, and the distance between the boundary and these points defines the margin on either side. Positioning the boundary midway between the support vectors produces the maximum-margin separator.
Temperature readings appear along a single horizontal axis, increasing from left to right. Once again, circles represent safe conditions, and squares represent unsafe conditions. Because unsafe readings now occur at both extremes while safe readings occupy the middle, no single threshold can separate the classes. The observations are therefore not linearly separable in this one-dimensional feature space.
Mapping each temperature reading into a two-dimensional feature space defined by temperature and temperature squared makes the classes linearly separable. The points are schematic rather than exact functional values. The dashed line is a hyperplane separating the safe observations, shown as circles, from the unsafe observations, shown as squares. It demonstrates possible separation, not the optimal maximum-margin boundary.
The dashed line represents the optimized decision boundary, while the two solid lines represent the parallel hard-margin boundaries. The support vectors lie on those margins and constrain their maximum separation. All remaining training observations lie beyond the margins.
Two observations that depart from the broader class structure constrain the hard-margin solution. To classify both correctly, the decision boundary tilts and the parallel margins contract. The model achieves perfect training separation, but the narrower margin makes the boundary more sensitive to variation in new data.
Most safe and unsafe observations follow distinguishable patterns, but several unsafe observations depart from the broader class structure. These irregular observations make perfect separation impractical and motivate the controlled violations permitted by a soft-margin SVM. No decision boundary or margins have yet been fitted.
The same synthetic two-class data fitted with linear, third-degree polynomial, and RBF kernels. The linear kernel produces a straight boundary, the polynomial kernel captures higher-order interactions through a curved boundary, and the RBF kernel produces a localized nonlinear boundary. The SVM framework remains unchanged; only the kernel used to compare observations differs.

Summary

  • Support vector machines make generalization, rather than training fit alone, the central objective of classification. Vladimir Vapnik’s framework favors a boundary whose controlled flexibility makes the learned relationship more likely to persist for new observations.
  • A hard-margin SVM applies when two classes are linearly separable. It uses the closest observations, the support vectors, to identify the hyperplane with the widest possible margin, thereby translating geometric separation into a constrained optimization problem.
  • A soft-margin SVM accommodates noise, overlap, and unusual observations by permitting controlled margin violations. Slack variables quantify those violations, the penalty parameter balances them against margin width, and cross-validation helps select a value likely to generalize.
  • A fitted linear SVM can predict through either the direct form, using its weight vector and bias, or the equivalent support-vector form. Dot products connect the two representations and allow predictions to be calculated directly from the support vectors.
  • Kernels extend SVMs to relationships that are nonlinear in the original feature space. The kernel trick calculates transformed dot products without explicitly constructing every new feature, while the kernel and its parameters determine the kinds and flexibility of boundaries available to the model.
  • Statistical learning theory explains why the SVM’s design supports generalization. Structural risk minimization considers empirical risk together with model capacity; VC dimension provides a formal measure of that capacity and margin maximization helps control how much flexibility the fitted classifier uses.
  • The support-vector framework extended directly to support vector regression and inspired later approaches to anomaly detection, nonlinear dimensionality reduction, and margin-based learning. SVMs remain useful in selected high-dimensional and feature-rich domains, while their broader principles continue to appear in boosting, representation learning, and modern AI.

FAQ

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Timeless Algorithms, The Foundational Ideas ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Timeless Algorithms, The Foundational Ideas ebook for free