32
$\begingroup$

What is the difference between a one-vs-all and a one-vs-one SVM classifier?

Does the one-vs-all mean one classifier to classify all types / categories of the new image and one-vs-one mean each type / category of new image classify with different classifier (each category is handled by special classifier)?

For example, if the new image to be classified into circle, rectangle, triangle, etc.

$\endgroup$

1 Answer 1

44
$\begingroup$

The difference is the number of classifiers you have to learn, which strongly correlates with the decision boundary they create.

Assume you have $N$ different classes. One vs all will train one classifier per class in total $N$ classifiers. For class $i$ it will assume $i$-labels as positive and the rest as negative. This often leads to imbalanced datasets meaning generic SVM might not work, but still there are some workarounds.

In one vs one you have to train a separate classifier for each different pair of labels. This leads to $\frac{N(N-1)}{2}$ classifiers. This is much less sensitive to the problems of imbalanced datasets but is much more computationally expensive.

$\endgroup$
5
  • $\begingroup$ Please, did you mean i-labels as positive OR i-th label as positive ? $\endgroup$
    – PeterB
    Commented May 13, 2017 at 0:10
  • $\begingroup$ labels corresponding to the class i as positive. $\endgroup$
    – Gnattuha
    Commented May 14, 2017 at 21:05
  • $\begingroup$ @Gnattuha - What do you mean by imbalanced datasets? Thanks in advance. $\endgroup$ Commented Mar 21, 2018 at 17:34
  • 1
    $\begingroup$ I read here - en.wikipedia.org/wiki/… - "Although this strategy is popular, it is a heuristic that suffers from several problems. Firstly, the scale of the confidence values may differ between the binary classifiers. Second, even if the class distribution is balanced in the training set, the binary classification learners see unbalanced distributions because typically the set of negatives they see is much larger than the set of positives". Still how does that imbalancing affect the accuracy? $\endgroup$ Commented Mar 21, 2018 at 17:44
  • $\begingroup$ @Gnattuha Cud you plz elaborate more on how the two cases are less/more sensitive to class imbalance as you mentioned? $\endgroup$
    – Debbie
    Commented Apr 3, 2023 at 20: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.