Hi Everyone, Could you please let me know if the latest opencv support multiclass svm. Thanks in advance
Multi class SVM
Multi class SVM
Asked: 2014-06-23 04:05:06 -0600
Seen: 196 times
Last updated: Jun 23 '14
yes it does. just use a POLY or LINEAR flag, not RBF
Is it possible to have a single SVM classifier perform multi-class classification? Eg: If I have 5 classes say A,B,C,D,E with label 0,1,2,3,4 and if a single SVM classifier is trained for this data, then it will correctly label class B element with label 2. From what I read, it said that I will have to train multiple SVM binary classifiers and then predict label using One-to-All or One-to-One comparision. Could some one clear things for me?
@Amit , both ways are possible. either have 1 svm with 5 classes, or 5 one-against all svm's .
you will have to do your own experiments, what works better on your data.
5 one-against all SVM? I dint quite get you!
the only difference is in the labels, for one-vs-all you'd have 0,1,0,0,0 labels for B, 0,0,1,0,0 for C, etc.
So basically in 5 one-against all, I will have 5 different SVM classifiers. The first classifier will check if the test-class belongs to class A. If it belongs to it, I will predict '1' else '0'. Same will happen for other SVM classifiers and at the end, the classifier having predicted value '1' will be selected. Am I correct ?
yes, exactly.