Practical exercise in SVM

99 Views Asked by At

Suppose we have four positive points $\{0,1,2,3\}$ and three negative points $\{-3,-2,-1\}$. We want to learn soft-margin linear SVM $\min_{w}0.5 \left \| w \right \| +C \sum \epsilon_i$ the constraints are $y_i(w^Tx+b)>1 -\epsilon_i; \epsilon_i \geq 0 $.

Questions:

  1. If $C \rightarrow \infty $, what are $w$ and $b$. What are the support vectors?
  2. If $C=0$, what are $w$ and $b$. What are the support vectors?

Solution: If $C \rightarrow \infty $, we are interested in the narrowest margin with the lowest number of errors, and in our case there is a perfect separation therefore $-1$ and $0$ are the support vectors. And $w0+b=1; -w+b=-1$,so $w=2, b=1$.

If $C=0$ we are interested in the broadest margin and we don't care about the error, therefore support vectors are $3$ and $-3$ and $w=\frac{1}{3}, b=0$.

Is this correct?