Intermediate Topic 22 of 51 AI & Machine Learning
Support Vector Machines
Classifiers maximizing the margin between classes.
How it works
A support vector machine finds the hyperplane that separates classes with the maximum margin, the widest gap between the boundary and the nearest points, called support vectors, which alone determine the boundary. Soft-margin versions allow some misclassifications controlled by a parameter C. The kernel trick implicitly maps data to a higher-dimensional space, using kernels such as polynomial and radial basis function, to find nonlinear boundaries. Support vector regression applies the idea to continuous targets.
Step-by-step walkthrough
- Find a boundary that separates the classes.
- Many lines work, choose the one with the widest margin.
- The points touching the margin are the support vectors.
- Only they define the boundary.
- The kernel trick allows curved boundaries.
Where it is used
Text classification, image recognition before deep learning, bioinformatics and small to medium datasets with many features use SVMs.
Common pitfall
Training scales poorly, roughly quadratic or worse in the number of samples, so large datasets are slow. Performance depends on kernel and hyperparameters C and gamma, requiring tuning with cross-validation. Features must be scaled. Outputs are not probabilities unless calibrated. For very large data, linear SVMs or gradient boosting and neural networks are often preferred.
Where it fits in the course
Support Vector Machines is topic 22 of 51 in AI & Machine Learning, rated Intermediate. It follows Naive Bayes. The next topic is Random Forests.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the AI & Machine Learning quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the AI & Machine Learning quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Support Vector Machines?
Where do people use Support Vector Machines?
What is the most common mistake with Support Vector Machines?
What should I learn before this topic?
How can I practice it?
Is Support Vector Machines hard to learn?
How long does it take to learn Support Vector Machines?
Which topics are related to Support Vector Machines?
What should I study after Support Vector Machines?
Related topics
- Naive Bayes (AI & Machine Learning)
- Random Forests (AI & Machine Learning)
- Regularization (AI & Machine Learning)
- Gradient Boosting (AI & Machine Learning)
- Raster vs Vector Graphics (Graphics, Vision & Media)
- Virtual Machines in Cloud (Distributed Systems & Cloud)
- Virtual Machines (Languages & Compilers)