Lagrange Multipliers for SVM optimization
For each constraint we will use αi Lagrange multipliers (Lagrange-Multiplikatoren).
L(w,b,α)=21∥w∥2−i=1∑nαi[yi(w⋅xi−b)−1]
The Lagrange multiplier needs to be maximized with α, but we still want to minimze the whole function with w,b.
Primal vs. Dual Formulation
-
Primal formulation:
p∗=w,bminαmaxL(w,b,α)
-
Dual formulation:
d∗=αmaxw,bminL(w,b,α)
These formulations are actually the same (Slater's condition), so we can solve the dual formulation by first minimizing the function for w and b.
Solution using Partial Derivatives
We would like to minimize this function:
L(w,b,α)=21∥w∥2−i=1∑nαi[yi(w⋅xi−b)−1]
To do this, we want to calculate the extreme values, so we calculate the partial derivatives for \begin{equation} \frac{\partial \mathcal{L}}{\partial w}\end{equation} and \begin{equation} \frac{\partial \mathcal{L}}{\partial b}\end{equation} like this:
∂w∂L=w−i=1∑nαiyixi=0∂b∂L=−i=1∑nαiyi⇒w=i=1∑nαiyixi=0⇒i=1∑nαiyi=0
We then insert the results for w and b resulting in the reamining maximization problem under two constraints.
L(w,b,α)=i=1∑nαi−21i,j=1∑nyiyjαiαj(xi⋅xj)
This is the optimization problem now:
αmaxL(w,b,α) s.t. αi≥0,i=1∑nαiyi=0
also see Karush-Kuhn-Tucker Conditions.