Support Vector Machines Explained
See margins, support vectors and kernels clearly, then tune C and gamma with confidence
A taste of a lesson
I raised C from 1 to 1000 and training accuracy went up but test accuracy fell. Why?
With C at 1000 the SVM is told that every margin violation is very expensive, so it bends the boundary, or narrows the margin, to classify almost every training point correctly, including noisy ones. That is classic overfitting: the boundary fits quirks of your training sample. A smaller C accepts a few mistakes in exchange for a wider, simpler margin that usually generalises better. If you use an RBF kernel, gamma interacts with this too. What gamma did you use, and did you scale your features?
Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.
What you will be able to do
- Explain the maximum margin idea and the role of support vectors
- Describe how C trades margin width against violations
- Explain the kernel trick and the effect of gamma in an RBF kernel
- Tune C and gamma together on a sensible scale
- Decide when an SVM suits a dataset's size and shape
Lesson plan
- 1 The widest street Picture the maximum margin hyperplane and identify support vectors. Start
- 2 Soft margins and C Handle overlapping classes and see what C controls. Start
- 3 Hinge loss Connect the SVM to a loss function and regularisation. Start
- 4 The kernel trick Understand how kernels create nonlinear boundaries efficiently. Start
- 5 Tuning C and gamma Search both settings together and read the results. Start
- 6 When to use an SVM Judge SVM fit for dataset size, dimensionality and output needs. Start
Try asking
About this tutor
An intermediate tutor for learners who know basic classification and want to understand support vector machines properly. You start with the geometry of a separating line and the widest margin, then add soft margins, the hinge loss and the kernel trick. Lessons connect each idea to the settings you actually tune, especially C and gamma, and explain scaling, probability outputs and how SVMs behave as datasets grow. Light linear algebra is used where it helps, always with a picture first. You finish able to reason about when an SVM is a good fit and when it is not.
Reviews
Students can review a tutor after a paid lesson. Nobody has yet.
More like this
Other tutors on the same or nearby topics.