A support vector machine is a kernel model y(x) = ∑n an tn k(x, xn) + b whose coefficients are found from a convex dual problem, and most an come out exactly zero. The points with an > 0 are the support vectors: they alone define the boundary. The solver here is a small sequential minimal optimisation (SMO), the same algorithm as in the Python code. Click on the plot to add or remove points and watch the solution change. In regression, errors smaller than ε are free, so points inside the tube are not support vectors.
Classification: red is t = +1 and blue t = −1; the solid line is y(x) = 0 and the dashed lines the margins y(x) = ±1. Gold rings: support vectors on the margin (0 < a < C); violet rings: bounded support vectors (a = C, inside the margin or misclassified). Data are simulated; the overlapping classes are a stand-in for the synthetic set of Bishop (2006), Appendix A.
code/ch07_sparse_kernel_machines.py (functions smo_solve, svc_fit, svr_fit; Figures 7.1, 7.2, 7.4, 7.5, 7.6, 7.8) and the checks code/checks_ch07.py. The relevance vector machine, a sparser Bayesian relative, is in the next demo.