A 1-D training set has with label , and and with label . What are the hard-margin SVM , and the dual variables , and which points are support vectors?
Supervised learning, Support vectors and KKT
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can solve a tiny hard-margin SVM and read off the support vectors from the KKT conditions.
Key idea
For a hard-margin SVM, with and . Only points with can have .
Steps
- Geometry: the closest points of opposite classes are and . The best boundary is halfway, at , so the margin touches both of them.
- Impose on both: and . Adding gives , so and . The margin width is , which matches the gap between 1 and 3.
- Check : . It is outside the margin, so by complementary slackness .
- Use : , so .
- Use : , so . The duals are .
- Support vectors are and . Removing would not change the solution. As a check, the primal value equals the dual value .
Common mistakes
- Calling a support vector because it is in the positive class. Only points exactly on the margin are.
- Forgetting the constraint and getting a wrong .
- Placing the boundary at the mean of all points instead of halfway between the closest opposite-class points.
How long your answer should be
Half a page; 4–5 minutes.
Read this
Previous in Supervised learning: Take an orthonormal design () with noise variance . For one coefficient with true value , find the mean squared error of the ridge estimate as a function of . Show that some always beats OLS, find the best , and evaluate it for , . Why is this not a free lunch?
Next in Supervised learning: How do you derive the dual of the soft-margin SVM subject to and ? How do you show the box constraint , and what are the KKT conditions that classify each point?