如何使用支持向量机(SVM)进行多类分类 [英] How to do multi class classification using Support Vector Machines (SVM)
问题描述
在每本书和每个示例中,它们始终仅显示二进制分类(两个类),并且新矢量可以属于任何一个类.
In every book and example always they show only binary classification (two classes) and new vector can belong to any one class.
这里的问题是我有4个课程(c1,c2,c3,c4).我已经为4个班级训练了数据.
Here the problem is I have 4 classes(c1, c2, c3, c4). I've training data for 4 classes.
对于新矢量,输出应类似于
For new vector the output should be like
C1 80%(获胜者)
c2 10%
c3 6%
c4 4%
如何执行此操作?我打算使用libsvm(因为它最受欢迎).我对此不太了解.如果您以前曾经使用过,请告诉我应该使用的特定命令.
How to do this? I'm planning to use libsvm (because it most popular). I don't know much about it. If any of you guys used it previously please tell me specific commands I'm supposed to use.
推荐答案
LibSVM使用一对一方法解决多类学习问题.从常见问题解答:
LibSVM uses the one-against-one approach for multi-class learning problems. From the FAQ:
问:libsvm用于多类SVM的方法是什么?为什么不使用其余部分为1"方法?
Q: What method does libsvm use for multi-class SVM ? Why don't you use the "1-against-the rest" method ?
这是一对一的.我们在进行以下比较后选择了它:C.-W.许和C.-J.林用于多类支持向量机的方法的比较, IEEE Transactions on Neural Networks,13(2002),415-425.
It is one-against-one. We chose it after doing the following comparison: C.-W. Hsu and C.-J. Lin. A comparison of methods for multi-class support vector machines, IEEE Transactions on Neural Networks, 13(2002), 415-425.
剩下的1-对抗"是一种很好的方法,其性能可与剩下的1- + 1"媲美.我们之所以这样做是因为它的训练时间更短.
"1-against-the rest" is a good method whose performance is comparable to "1-against-1." We do the latter simply because its training time is shorter.
这篇关于如何使用支持向量机(SVM)进行多类分类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!