吴恩达机器学习——支持向量机SVM

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=1m[y(i)cost1(θTx(i))+(1y(i))cost0(θTx(i))]+21i=1nθ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 θTx0otherwise
大间距分类器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=1nθ

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值