How does the one-vs-one strategy handle multi-class classification?

Quick Overview

Asks how the one-vs-one strategy handles a multi-class classification problem, from training the binary models to combining their outputs into one prediction. Tests knowledge of model count, tie handling, why kernel SVMs use it, and its costs.

How does the one-vs-one strategy handle multi-class classification?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

How does the one-vs-one strategy handle multi-class classification? Cover how the binary classifiers are trained, how their outputs become one predicted class, and what the approach costs. ```hint Work a small case Take 4 classes. List the binary problems you would build, which training rows each one sees, and what each one can output for a test point from any class. ``` ### What a Strong Answer Covers - How many binary classifiers are built and which samples each one trains on. - How the pairwise outputs are combined into a single predicted class, including what happens on a tie. - Why the scheme suits kernel SVMs, with the training-cost argument. - The weaknesses: model count and inference cost, votes from classifiers that never saw the true class, and the lack of probabilities. ### Follow-up Questions - With n samples spread evenly over K classes and a learner whose training cost grows as $n^2$, compare the total training cost of one-vs-one and one-vs-rest. - How would you get class probabilities out of a one-vs-one ensemble? - With 1,000 classes, would you still use one-vs-one? What would you use instead? - Why can `SVC.predict` disagree with the argmax of `SVC.predict_proba` on the same sample?

Overview: Asks how the one-vs-one strategy handles a multi-class classification problem, from training the binary models to combining their outputs into one prediction. Tests knowledge of model count, tie handling, why kernel SVMs use it, and its costs.

Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

How does the one-vs-one strategy handle multi-class classification?

Cover how the binary classifiers are trained, how their outputs become one predicted class, and what the approach costs.

What a Strong Answer Covers Guidance

  • How many binary classifiers are built and which samples each one trains on.
  • How the pairwise outputs are combined into a single predicted class, including what happens on a tie.
  • Why the scheme suits kernel SVMs, with the training-cost argument.
  • The weaknesses: model count and inference cost, votes from classifiers that never saw the true class, and the lack of probabilities.

Follow-up Questions Guidance

  • With n samples spread evenly over K classes and a learner whose training cost grows as n2n^2 , compare the total training cost of one-vs-one and one-vs-rest.
  • How would you get class probabilities out of a one-vs-one ensemble?
  • With 1,000 classes, would you still use one-vs-one? What would you use instead?
  • Why can SVC.predict disagree with the argmax of SVC.predict_proba on the same sample?