文章目录
1.SVM cost function 代价函数
SVM cost function的引出
从logistic regression的代价函数开始
修改logistic regression的代价函数,粉色划线部分为SVM的cost function。
cost function代价函数 :
m i n θ 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 ∑ θ j 2 \underset{\theta}{min}C\sum_{i=1}^m[y^{(i)}cost_1(\theta^Tx^{(i)}))+(1-y^{(i)})cost_0(\theta^Tx^{(i)})]+\frac{1}{2}\sum\theta_j^2 θminCi=1∑m[y(i)cost1(θTx(i)))+(1−y(i))cost0(θTx(i))]+21