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.


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.

  • $\begingroup$ Please, did you mean i-labels as positive OR i-th label as positive ? $\endgroup$ – PeterB May 13 '17 at 0:10
  • $\begingroup$ labels corresponding to the class i as positive. $\endgroup$ – Gnattuha May 14 '17 at 21:05
  • $\begingroup$ @Gnattuha - What do you mean by imbalanced datasets? Thanks in advance. $\endgroup$ – saurabheights Mar 21 '18 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$ – saurabheights Mar 21 '18 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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