支持向量机 SVM

文章目录

超平面、核技巧、对偶、KKT条件


  • 超平面

    $W^TX + b = 0$

每个样本点x到超平面的距离

$d = Wx + b$

希望的情况是d > 0,当y > 0

在平面尽量居中,距离尽量远的设想下,问题转换为

$min ||W||^2$

s.t. $y_i(W^Tx + b) >= 1$

由对偶,可将原问题转化为

$\max_\alpha \sum_{i=1}^m\alpha_i -\frac{1}{2}\sum_{i=1}^m\sum_{j=1}^m\alpha_i\alpha_jy_iy_jx_i\cdot x_j \\ subject\space to\space 0 \le \alpha_i \le C, i=1…m, \sum_{i=1}^m{a_iy_i}=0$

对于待预测样本,预测方式

$\sum_{i\in SV} y_i \alpha_i K(x_i, x) + b,$


Reference

  1. Understanding the mathematics behind Support Vector Machines
  2. The Mathematics Behind Support Vector Machine Algorithm (SVM)
  3. sklearn-svm-svc(classification)