next up previous
Next: 1-Norm Soft Margin Up: Soft Margin SVM Previous: Soft Margin SVM

2-Norm Soft Margin

The primal Lagrangian for 2-norm problem above is

\begin{displaymath}L_p({\bf w},b,\xi,\alpha)=\frac{1}{2}{\bf w}^T{\bf w}+\frac{C...
...i_i^2
-\sum_{i=1}^m \alpha_i[y_i({\bf w}^T{\bf x}+b)-1+\xi_i]
\end{displaymath}

Substituting the following

\begin{displaymath}\frac{\partial L}{\partial {\bf w}}={\bf w}-\sum_{i=1}^m y_i\...
...;\;\;
\frac{\partial L}{\partial b}=\sum_{i=1}^m y_i\alpha_i=0 \end{displaymath}

into the primal Lagrangian, we get the dual problem
  $\textstyle \mbox{maximize}$ $\displaystyle L_d(\alpha)=\sum_{i=1}^m\alpha_i
-\frac{1}{2}\sum_{i=1}^m\sum_{j...
...iy_j\alpha_i\alpha_j {\bf x}_j^T{\bf x}_i
-\frac{1}{2C}\sum_{i=1}^m \alpha_i^2$  
    $\displaystyle =\sum_{i=1}^m\alpha_i
-\frac{1}{2}\sum_{i=1}^m\sum_{j=1}^m y_iy_j\alpha_i\alpha_j({\bf x}_j^T{\bf x}_i
+\frac{1}{C}\delta_{ij})$  
  $\textstyle \mbox{subject to}$ $\displaystyle \alpha_i\ge 0,\;\;\;\;
\sum_{i=1}^m \alpha_i y_i=0$  

This QP program can be solved for $\alpha_i$. All support vectors ${\bf x}_i$ corresponding to $\alpha_i>0$ satisfy:

\begin{displaymath}y_i({\bf x}_i^T{\bf w}+b)=1-\xi_i \end{displaymath}

Substituting ${\bf w}=\sum_{j\in sv} y_j\alpha_j{\bf x}_j$ into this equation, we get

\begin{displaymath}y_i(\sum_{j\in sv} y_j\alpha_j({\bf x}_i^T {\bf x}_j)+b)=1-\x...
...\sum_{j\in sv} y_j\alpha_j({\bf x}_i^T {\bf x}_j)=1-\xi_i-y_ib \end{displaymath}

For the optimal weight ${\bf w}$, we have
$\displaystyle \vert\vert{\bf w}\vert\vert^2$ $\textstyle =$ $\displaystyle {\bf w}^T {\bf w}=\sum_{i\in sv} \alpha_i y_i {\bf x}^T_i
\sum_{...
... \sum_{i\in sv} \alpha_i y_i
\sum_{j\in sv} \alpha_j y_j {\bf x}^T_i{\bf x}_j$  
  $\textstyle =$ $\displaystyle \sum_{i\in sv} \alpha_i (1-\xi_i-y_i b)
=\sum_{i\in sv} \alpha_i-\sum_{i\in sv}\alpha_i \xi_i
-b\sum_{i\in sv} y_i \alpha_i$  
  $\textstyle =$ $\displaystyle \sum_{i\in sv} \alpha_i-\sum_{i\in sv}\alpha_i \xi_i
=\sum_{i\in sv} \alpha_i -\frac{1}{C}\sum_{i\in sv}\alpha_i^2$  

The last equation is due to $\xi_i=\alpha_i/C$. The optimal margin is

\begin{displaymath}1/\vert\vert{\bf w}\vert\vert=(\sum_{i\in sv} \alpha_i -\frac{1}{C}\sum_{i\in sv}\alpha_i^2)^{-1/2} \end{displaymath}


next up previous
Next: 1-Norm Soft Margin Up: Soft Margin SVM Previous: Soft Margin SVM
Ruye Wang 2016-08-24