Skip to content

ML Models & Algorithms

Support Vector Machine (SVM)

In shortA classification model that finds the boundary separating classes with the widest possible margin; strong on text features like TF-IDF.

Updated 24 Oct 2026· 2 min read

A support vector machine (SVM) is a supervised machine learning model mainly used for classification. It separates two classes by finding the boundary (a hyperplane) that leaves the widest possible gap, or margin, between them. SVMs were a leading method for text classification before deep learning and are still a strong, fast choice for small and medium datasets.

How it works

  • Each example is a point in a space with one dimension per feature, for example one per word in a TF-IDF vector.
  • The SVM finds the boundary that separates the classes with the largest margin. Only the points closest to the boundary, the support vectors, determine where it sits.
  • The C parameter controls the trade-off between a wide margin and classifying every training point correctly, which helps when the data is noisy.
  • When classes cannot be separated with a straight line, the kernel trick (for example the RBF kernel) lets the SVM draw curved boundaries without computing the extra dimensions explicitly.

SVMs are binary at heart. For three or more classes they use one-vs-one or one-vs-rest strategies, which libraries such as scikit-learn apply automatically. They output class decisions rather than probabilities, although probability estimates can be added.

How it’s used in SEO and marketing

  • Sentiment classification of reviews, social posts or ad copy.
  • Search intent classification of keywords from text features.
  • Page type identification from on-page features.
  • Spam or low-quality content detection.
  • Audience segmentation when you already have labelled segments.

Example

MLforSEO’s sentiment deep dive cites research by da Silva and colleagues (2016) that classified Twitter data with an SVM, using a small labelled set to improve accuracy in a semi-supervised setup. A marketing version: label 500 product reviews as positive, negative or neutral, convert them to TF-IDF vectors, train a linear SVM, and check precision and recall per class on a held-out set before classifying the remaining 20,000.

Limitations and things to watch

  • Training slows down a lot on very large datasets, especially with non-linear kernels.
  • Features need scaling, and kernel and C settings need tuning.
  • Results are harder to explain than logistic regression or a decision tree.
  • For nuanced language, fine-tuned transformer models or LLMs usually perform better, at a higher cost.

Learn it on MLforSEO

Sources and further reading

Other terms from ML Models & Algorithms

See all 55 ML Models & Algorithms terms →