AI Glossary

Support vector machine

A support vector machine (SVM) learns a decision function using support vectors and margin-based optimization. An SVM classifier balances separation between classes against allowed margin violations; kernels can produce nonlinear boundaries.

Also known as: SVM

· Updated · Chain of Thought

Suppose two measured features separate acceptable parts from defective parts. A linear SVM finds a separating line in that two-dimensional feature space. In a separable hard-margin example, the nearest training points determine the widest empty margin and are support vectors. In higher dimensions the separator is a hyperplane.

Real data can overlap. A soft-margin classifier permits points inside the margin or on the wrong side, with the parameter C controlling the penalty. A kernel lets the method represent a nonlinear boundary without explicitly constructing every transformed feature. Related SVM formulations also support regression and novelty detection.

Scale numeric features and choose the kernel and C using validation data. Kernel training can be expensive as the dataset grows. A wide training margin alone does not prove useful generalization, especially if the input features do not represent the actual task.

The closest points set the marginA two-dimensional plot has class A points at minus 1 minus 1, minus 1 plus 1 and minus 2 zero, and class B at plus 1 minus 1, plus 1 plus 1 and plus 2 zero. The separator is x equals zero, with margin lines at x equals minus 1 and plus 1. The four nearest points on the margin lines are circled as support vectors. The closest points set the marginA separable, hard-margin example in two feature dimensions Feature 1Feature 2−101Solid line: x = 0 separatorDashed: x = −1 and x = 1Circled points: support vectorsOne unit from the separatorBlack dots: class ABlue dots: class BSoft margins permit violations; kernels can model nonlinear boundaries.
A symmetric teaching dataset, not fitted production results. The x = 0 separator has a margin of one feature unit on each side. Soft-margin SVMs can have support vectors inside the margin too. Download the image

Sources

Go deeper