2
$\begingroup$

I used - library(e1071) which was able to predict all(10) of my classes in a single run. Now, why do people go for one Vs one and one Vs many approach? What is the benefit of those approaches?

Is it only library(e1071) that can do multi-class classification ?

Would the output or accuracy changes if the algorithm takes care of Multi-class Classification itself?

Thanks.

$\endgroup$
2
  • 1
    $\begingroup$ 1. "Kindly share your thoughts" is too broad an invitation. Please stick to specifics. 2. Did you read the help? the help on the function svm of that library, under "Details" says "For multiclass-classification with k levels, k>2, libsvm uses the ‘one-against-one’-approach, in which k(k-1)/2 binary classifiers are trained; the appropriate class is found by a voting scheme." ... so e1071 USES one-vs-one -- this falls under things you should do before posting -- specifically search and research $\endgroup$
    – Glen_b
    Commented Aug 30, 2017 at 0:37
  • $\begingroup$ @Glen_b Yes, I read the manual. But being a beginner when I read some blogs - It confuses me, when they solve the problem using one vs one or one vs Many than letting the algorithm itself to solve. So, I was just curious to know, in what way it affects our Model. $\endgroup$ Commented Aug 30, 2017 at 0:40

1 Answer 1

8
$\begingroup$

multi-class in any SVM package (including e1071) is either one vs one or one vs many. From the e1071 manual:

For multiclass-classification with k levels, k>2, libsvm uses the ‘one-against-one’-approach, in which k(k-1)/2 binary classifiers are trained; the appropriate class is found by a voting scheme.

SVMs are inherently two-class classifiers. They are not designed for multi-class classification so you have to do a voting scheme using one-vs-one or one-vs-many strategy.

$\endgroup$
2
  • $\begingroup$ @bdenovic When you say, you have to do a voting scheme - If I don't write the code to do it by generating a training set which has only two classes but rather just call the algorithm, will the algorithm be able to do the voting scheme itself? $\endgroup$ Commented Aug 30, 2017 at 0:47
  • 2
    $\begingroup$ No, you [programmer] have to add in the logic to handle multi-class separately. Most SVM packages have this built in already though so that you [the user] don't have to do anything extra (like what you experienced with e1071) $\endgroup$
    – bdeonovic
    Commented Aug 30, 2017 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.