SVM
SVM hypothesis:
min C ∑ i = 1 m [ y ( i ) c o s t 1 ( θ T x ( i ) ) + ( 1 − y ( i ) ) c o s t 0 ( θ T x ( i ) ) ] + 1 2 ∑ i = 1 n θ j 2 \min C\sum^m_{i=1}[y^{(i)}cost_1(\theta ^Tx^{(i)})+(1-y^{(i)})cost_0(\theta ^Tx^{(i)})]+\frac{1}{2}\sum^n_{i=1}\theta^2_j minCi=1∑m[y(i)cost1(θTx(i))+(1−y(i))cost0(θTx(i))]+21i=1∑nθj2
h θ ( x ) = { 1 if θ T x ⩾ 0 0 otherwise h_{\theta}(x)=\begin{dcases}1 &\text{if } \enspace\theta ^Tx\geqslant 0\\0 &\text{otherwise}\end{dcases} hθ(x)={
10if θTx⩾0otherwise
大间距分类器Large Margin Classifier/Intuition:当C很大时
SVM:当C不是很大时
margin:样本到决策边界的最大距离
margin使SVM具有鲁棒性
SVM使正负样本以最大margin分隔开来
大间隔分类器
min θ 1 2 ∑ j = 1 n θ j 2 = 1 2 ∥ θ ∥ 2 s . t . θ T x ( i ) ≥ 1 i f y ( i ) = 1 θ T x ( i ) ≤ − 1 i f y ( i ) = 0 \min_\theta\frac{1}{2}\sum_{j=1}^n\theta_j^2=\frac{1}{2}\Vert\theta\Vert^2\\ s.t.\quad\theta^Tx^{(i)}\ge1\qquad if\;y^{(i)}=1\\ \qquad\;\theta^Tx^{(i)}\le-1\quad\; if\;y^{(i)}=0 θmin21j=1∑nθ