SVM optimization problem
We can write the constraints as
When we construct the Lagrangian for our optimization problem, we have:
Let’s find the dual form of the problem.
- First minimize
with respect to and (for fixed ), to get .
- First minimize
We’ll do this by setting the derivatives of
with respect to and to zero: We have: $$w = \sum_{i=1}^m \alpha_i y_i x_i$$ and $$\sum_{i=1}^m \alpha_i y_i = 0$$. Plugging back into the Lagrangian equation:
Hard SVM
Hyperplane:
Soft SVM
Hyperplane:
Lagrangian:
Weight vector:
The reason that ξ disappears: The slack variables
Kernel SVM
Hyperplane:
Linear:
Polynomial:
Gaussian (RBF):
Sigmoid: