One-vs-Rest (OvR)#
A multiclass strategy fitting one binary classifier per class.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
One-vs-Rest (also one-vs-all) reduces a K-class problem to K binary ones — in each, a single class is the positive and all the others are lumped together as the negative. It’s the simplest way to let binary tools handle many classes.
How it’s used#
For a K-class model you get K ROC curves and AUCs, one per class, each answering how well does the model
separate this class from everything else? scikit-learn exposes it as multi_class='ovr'; it also matches
the multilabel setting, where classes aren’t exclusive.
The catch#
Each binary split is imbalanced — the positive class is only about 1/K of the data, and the “rest” group’s makeup shifts with the class distribution, so OvR scores are sensitive to class imbalance. The alternative, One-vs-One, compares class pairs and is less imbalance-prone but trains \(O(K^2)\) classifiers.
Theme: Classification & Averaging Metrics · All terminology
Hint
Mind map — connected ideas
Multiclass Classification · Macro AUC · Micro AUC · Binary Classification · ROC-AUC (Receiver Operating Characteristic – Area Under Curve, = AUROC) · Multiclass AUROC
Hint
More in Classification & Averaging Metrics
Accuracy · AUC (Area Under the Curve) · Average Precision (AP) · Binary Classification · Classification Probability · Discriminatory Power · F1-score · Gini Coefficient · Harmonic Mean · Log Loss (also called Logarithmic Loss or Cross-Entropy Loss) · Macro AUC · Macro AUROC (Macro-Averaged AUROC) · Macro Averaging · Macro F1
See also
Source article Adapted (context, re-expressed) in our own words from: One-vs-Rest (OvR) (insightful-data-lab.com).