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
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.
Sources
- scikit-learn: Support Vector Machines — Explains support vectors, soft margins, C, kernels, feature scaling and computational limits.
Go deeper
- scikit-learn: Maximum margin separating hyperplane docs
Plot the separator, margin boundaries and support vectors for a two-class example.