样本(\(x_{i}\),\(y_{i}\))个数为\(m\):
\[\{x_{1},x_{2},x_{3}...x_{m}\}\]
\[\{y_{1},y_{2},y_{3}...y_{m}\}\]
其中\(x_{i}\)为\(n\)维向量:
\[x_{i}=\{x_{i1},x_{i2},x_{i3}...x_{in}\}\]
其中\(y_i\)为类别标签:
\[y_{i}\in\{-1,1\}\]
其中\(w\)为\(n\)维向量:
\[w=\{w_{1},w_{2},w_{3}...w_{n}\}\]
函数间隔\(r_{fi}\):
\[
r_{fi}=y_i(wx_i+b)
\]
几何间隔\(r_{di}\):
\[
r_{di}=\frac{r_{fi}}{\left \| w \right \|}
=\frac{y_i(wx_i+b)}{\left \| w \right \|}
\]
最小函数间隔\(r_{fmin}\):
\[
r_{fmin}=\underset{i}{min}\{y_i(wx_i+b)\}
\]
最小几何间隔\(r_{dmin}\):
\[
r_{dmin}=\frac{r_{fmin}}{\left \| w \right \|}
=\frac{1}{\left \| w \right \|}*\underset{i}{min}\{y_i(wx_i+b)\}
\]
目标是最大化最小几何间隔\(r_{dmin}\):
\[
max\{r_{dmin}\}=
\underset{w,b}{max}\{\frac{1}{\left \| w \right \|}*\underset{i}{min}\{y_i(wx_i+b)\}\}
\]
最小几何间隔的特点:等比例的缩放\(w,b\),最小几何间隔\(r_{dmin}\)的值不变。
因此可以通过等比例的缩放\(w,b\),使得最小函数间隔\(r_{fmin}\)=1,即:
\[
\underset{i}{min}\{y_i(wx_i+b)\}=1
\]
此时会产生一个约束条件:
\[
y_i(wx_i+b)\geq 1
\]
最终优化目标为:
\[
\left\{\begin{matrix}
\underset{w,b}{max}\frac{1}{\left \| w \right \|}
\\
y_i(wx_i+b)\geq 1
\end{matrix}\right.
=
\left\{\begin{matrix}
\underset{w,b}{min}\frac{1}{2}{\left \| w \right \|}^2
\\
y_i(wx_i+b)\geq 1
\end{matrix}\right.
\]
来源:https://www.cnblogs.com/smallredness/p/11059901.html