3.3 Quadratic Programming
A convex quadratic with linear constraints. SVM is the running example.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
The notes follow Deisenroth, Faisal, and Ong, Mathematics for Machine Learning.
1. Quadratic cost, linear constraints
A quadratic program keeps linear inequalities and lets the objective be quadratic. That is the next step past an LP: nonlinear models whose cost is a bowl, plus the same polyhedron as before.
This is also how regularization enters: a quadratic penalty on is still a QP when the constraints stay linear. Soft-margin SVM is the example this course cares about.
with , , , and symmetric positive definite. Then the objective is convex, so a local min is the unique global min. Still variables and linear constraints.
2. Dual
Lagrangian
Stationarity in :
If is invertible,
Substitute back. The dual Lagrangian is the concave quadratic
The dual problem is therefore
Week 5 does the same substitution for the SVM dual, then replaces inner products by a kernel.
3. Why SVM is a QP
Soft-margin SVM:
- : hyperplane weights.
- : trade-off between margin size and slack.
- : slack; a point may sit on the wrong side of the margin, at a linear cost.
Quadratic objective, linear inequalities: a QP, not an LP, because of .
4. Practice
-
Why is a soft-margin SVM a quadratic program?
-
What does positive definite buy you that a general quadratic objective does not?
-
After , what variables does the dual still optimize, and what constraint remains on them?