Coursera, Machine Learning, SVM
Support Vector Machine (large margin classifiers )
1. cost function and hypothesis
下面那个紫色线就是SVM 的cost function
![](https://www.evernote.com/shard/s334/res/55a762a9-9407-463a-aa1e-ac20add1bc55.png?search=model%20sele)
![](https://www.evernote.com/shard/s334/res/70bdd58d-d936-42b9-9358-300138b9ca55/Image.png?search=model%20sele)
![](https://images2018.cnblogs.com/blog/1336977/201809/1336977-20180902212752471-53448961.png)
2. SVM 的数学解释
![](https://www.evernote.com/shard/s334/res/a20cfe3a-6646-4180-81af-ce67dffd1a91.png?search=model%20sele)
![](https://www.evernote.com/shard/s334/res/aa72f4e9-b555-4a84-956e-ab500fa65b8d.png?search=model%20sele)
3. SVM with kernel
我的理解是 kernel 的作用就是把低维度的 x 转化成高维的 f, 然后就好分类了
![](https://images2018.cnblogs.com/blog/1336977/201809/1336977-20180903213352255-725358458.png)
note: 上图就是一个2维(x1, x2)变3维(f1, f2, f3)的例子
![](https://www.evernote.com/shard/s334/res/35211403-7661-4593-9ef8-1659bdaecf5d.png?search=model%20sele)
4. SVM in practice
![](https://www.evernote.com/shard/s334/res/2d1af234-23e7-4989-bff0-a1e797825a3c.png?search=model%20sele)
想一想,上面的结论也合理,因为SVM+kernel 会把n 个feature变成 m 个feature (m>n 以便放到更高维空间), 所以如果n>m 达不到低维到高维的变换,m 太大又会造成维度太高,最适合的情况是 m 略大于 n.大概相差一个数量级,如上图例子.
note: SVM without kernel 和liner regression 只能 linear 分类, 而SVM with kernel 可以做到non-linear 分类.
Ref:
转载请注明出处 http://www.cnblogs.com/mashuai-191/