一、推导SVM
对于使用perceptron algorithm来分类,优化的目标函数是不存在错误点,想要达到不存在错误点的目标hypothesis可以有多条,最后能取到的hypothesis依赖于数据,结果具有随机。可能有的结果不错,有的结果不好,不具有稳定性。我们希望获得的hypothesis在一组数据是一致的,而不是可能取决于根数据存放顺序(也影响了generalization 能力)。
linear support vector machine
如果要我们在perceptron algothrim中选择一个最好的hypothesis,为了保证泛化能力,我们希望选择hypothesis 到最近的数据点的距离最大的那条hypothesis作为g。将数据点到hypothesis距离描述为hypothesis fatness。以fatness描述最近点到hypothesis的距离。这样的hypothesis成为large margin separating。

linear support vector machinelinear support vector machine
代入距离公式后,化简优化目标:
linear support vector machine实际上所有的hypothesis可通过放缩以最基础的wTx+b=1来表示,因此可进一步化简:linear support vector machine
限制条件中含有min的表达,依旧不好做,能不能放宽限制条件?数学上可证明,我们确实可以找到一个新的表达,不含min的限制,同时不使用距离的表达,以距离的平方来表达,加之,相较于求解最大值问题,我们更熟悉求解最小值,因此不断化简可得到下式:linear support vector machine二、求解SVM:
support vector machine:主要使用部分数据(support vector)来学习最终的hypothesis。
linear support vector machine
想想原来学习的方法,我们要如何解决这个优化问题呢?由于带有约束,梯度下降法不work,也没有analyatic solution,但是像上面这样的问题:求解一个关于未知数二次项的最小值,且约束是未知数的一次项,被称为二次优化问题!关于一个二次项的优化问题很好求解!
linear support vector machine对照二次优化的通用解法:
linear support vector machine
linear support vector machine

三、SVM优势
1、与带有正则项的优化目标函数相比,可以看出SVM也是追求低的模型复杂度:

linear support vector machine

2、由于所有点到hypothesis 的距离都要大于等于1,因此对于给定的样本,SVM无法scatter 所有可能dichotomies(相较于perceptron,dvc减少):
linear support vector machine因此,large-margin+transform既可保证模型的高次性,又可保证不会产生很多的候选hypothesis(复杂度不高)!

linear support vector machinelinear support vector machine

相关文章: