Dual Formulation
Learn dual formulation and derive Lagrangian dual function for hard and soft-margin SVM.
Why dual formulation?
The dual formulation of SVM is important because it allows us to kernelize the optimization problem, making it easier to find a hyperplane that separates the classes in a higher-dimensional feature space. Additionally, the dual formulation provides better visibility of the solution’s sparsity, which explains SVM’s strong generalization ability in high-dimensional feature spaces.
Lagrangian dual of hard-margin SVM
In the case of hard-margin SVM, we have a constrained optimization problem where we want to find the parameters that minimize the objective function subject to the constraint that all training samples are classified correctly with a margin of at least 1. This can be written as:
We introduce a Lagrange multiplier for each constraint to apply the Lagrangian method. We call it and write the Lagrangian as:
...