ANN(人工神经网络)和SVM(支持向量机)是监督机器学习和分类的两种流行策略。对于一个特定的项目,通常不清楚哪种方法更好,我确定答案总是“视情况而定”。通常,两者结合使用贝叶斯分类。
这些关于Stackoverflow的问题已经被问到关于ANN和SVM的问题:
神经网络与支持向量机分类
在我的分类问题中,ANN, SVM和KNN有什么区别
支持向量机或人工神经网络的文本处理?
在这个问题中,我想具体知道人工神经网络(特别是多层感知器)的哪些方面可能比支持向量机更可取?我问这个问题的原因是很容易回答相反的问题:支持向量机通常优于ann,因为它们避免了ann的两个主要弱点:
(1)人工神经网络通常收敛于局部极小值,而不是全局极小值,这意味着它们有时本质上“看不到大局”(或只见树不见林)。
(2)如果训练时间过长,人工神经网络通常会过拟合,这意味着对于任何给定的模式,人工神经网络可能会开始考虑噪声作为模式的一部分。
支持向量机不会遭受这两个问题中的任何一个。然而,目前还不清楚svm是否可以完全取代ann。那么,与支持向量机相比,人工神经网络有哪些特定的优势,可能使其适用于某些情况?我已经列出了支持向量机相对于人工神经网络的特定优势,现在我想看看人工神经网络的优势(如果有的话)。
从你提供的例子来看,我假设你所说的ann是指多层前馈网络(简称FF网络),比如多层感知器,因为它们与svm直接竞争。
One specific benefit that these models have over SVMs is that their size is fixed: they are parametric models, while SVMs are non-parametric. That is, in an ANN you have a bunch of hidden layers with sizes h1 through hn depending on the number of features, plus bias parameters, and those make up your model. By contrast, an SVM (at least a kernelized one) consists of a set of support vectors, selected from the training set, with a weight for each. In the worst case, the number of support vectors is exactly the number of training samples (though that mainly occurs with small training sets or in degenerate cases) and in general its model size scales linearly. In natural language processing, SVM classifiers with tens of thousands of support vectors, each having hundreds of thousands of features, is not unheard of.
此外,与在线SVM拟合相比,FF网络的在线训练非常简单,并且预测可以快得多。
编辑:以上所有内容都适用于内核化svm的一般情况。线性支持向量机是一个特殊的情况,因为它们是参数化的,并且允许使用简单的算法(如随机梯度下降)进行在线学习。
One obvious advantage of artificial neural networks over support vector machines is that artificial neural networks may have any number of outputs, while support vector machines have only one. The most direct way to create an n-ary classifier with support vector machines is to create n support vector machines and train each of them one by one. On the other hand, an n-ary classifier with neural networks can be trained in one go. Additionally, the neural network will make more sense because it is one whole, whereas the support vector machines are isolated systems. This is especially useful if the outputs are inter-related.
例如,如果目标是分类手写数字,10个支持向量机就可以了。每个支持向量机只能识别一个数字,而不能识别其他所有数字。由于每个手写数字不能包含除其类别以外的更多信息,因此试图用人工神经网络解决这个问题是没有意义的。
然而,假设目标是将一个人的激素平衡(针对几种激素)建模为一个容易测量的生理因素的函数,如距离上一顿饭的时间、心率等……由于这些因素都是相互关联的,人工神经网络回归比支持向量机回归更有意义。
从你提供的例子来看,我假设你所说的ann是指多层前馈网络(简称FF网络),比如多层感知器,因为它们与svm直接竞争。
One specific benefit that these models have over SVMs is that their size is fixed: they are parametric models, while SVMs are non-parametric. That is, in an ANN you have a bunch of hidden layers with sizes h1 through hn depending on the number of features, plus bias parameters, and those make up your model. By contrast, an SVM (at least a kernelized one) consists of a set of support vectors, selected from the training set, with a weight for each. In the worst case, the number of support vectors is exactly the number of training samples (though that mainly occurs with small training sets or in degenerate cases) and in general its model size scales linearly. In natural language processing, SVM classifiers with tens of thousands of support vectors, each having hundreds of thousands of features, is not unheard of.
此外,与在线SVM拟合相比,FF网络的在线训练非常简单,并且预测可以快得多。
编辑:以上所有内容都适用于内核化svm的一般情况。线性支持向量机是一个特殊的情况,因为它们是参数化的,并且允许使用简单的算法(如随机梯度下降)进行在线学习。