Linear Classifiers › One-vs-Rest Multiclass Strategy

Michael BrenndoerferApril 28, 20251 min read
Language AI HandbookAll chapters
Part 10 of 67Neural Network Foundations
Chapter 61Linear Classifiers › One-vs-Rest Multiclass Strategy
Reading section 13 of 16 · One-vs-Rest Multiclass Strategy · 1 minSection 13 of 16 · 1 min

Book contents

Section 13 of 16 · 1 min read

Linear Classifiers › One-vs-Rest Multiclass StrategyOne section · Sections in this chapter13 / 16 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Before softmax became standard, and still useful in some settings, the one-vs-rest (OvR) strategy handles multiclass problems by training KK separate binary classifiers. Classifier kk is trained to distinguish class kk from all other classes. At prediction time, all KK classifiers produce a score, and the class with the highest score is predicted.

OvR is simple to implement: you just train KK logistic regression models independently, one for each class. Each classifier sees the full training set, with the positive class being the kk-th class and the negative class being all other examples combined. This works well when the classes are well-separated and the models' output scores are on comparable scales.

The disadvantage of OvR is that the KK classifiers are not jointly trained to produce a coherent probability distribution. The scores from different classifiers are not comparable, and they do not necessarily sum to 1. Softmax (multinomial logistic regression) avoids this by training all KK weight vectors jointly and normalizing the outputs. In practice, multinomial logistic regression with softmax outperforms OvR, especially when classes are similar and the probability estimates need to be well-calibrated. Scikit-learn's multi_class='multinomial' parameter enables this.