difficulty 4/5
SVM
A classifier that places its boundary to leave the widest possible gap between the classes, with only the points on the edge of that gap deciding where it goes.
Intuition
If two classes can be separated by a straight line, there are infinitely many straight lines that do it. Logistic regression picks one by maximising likelihood. SVM asks a different question: which line leaves the widest gap?
The intuition is that a boundary squeezed against the data is fragile — nudge a point and it misclassifies. A boundary sitting in the middle of the widest possible corridor has the most room to be wrong about new data: "a slight error in measurement or a slight document variation will not cause a misclassification" [1, §15.1].
Formal definition
How it works
Where it's used
Why & when
Worked example
Pitfalls
Check yourself
3 questions
The questions on this page come with access. They are graded on the server, so the answers stay there until you have given yours.
Sources
- Introduction to Information Retrieval — Support vector machines (2008)book · retrieved 2026-10-07https://nlp.stanford.edu/IR-book/html/htmledition/support-vector-machines-and-machine-learning-on-documents-1.html
- Deep Learning (2016)book · retrieved 2026-10-07https://www.deeplearningbook.org/contents/ml.html
- scikit-learn — SVCdocs · retrieved 2026-10-07https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html