Back to Classic ML Mind Map
中文·English
📊 Classic MLID: multiclass-strategies

Multiclass Strategies: OvR/OvO/Softmax

多分类 OvR/OvO/Softmax
🎯Core Definition
three main strategies extend binary classifiers to KK classes. OvR (one-vs-rest): train KK 'class-vs-others' classifiers and predict by the highest score, O(Kd)O(K \cdot d) parameters; OvO (one-vs-one): train (K2)=K(K1)2\binom{K}{2} = \frac{K(K-1)}{2} pairwise classifiers and vote, simpler per model but O(K2)O(K^2) total cost; Softmax (direct multiclass): a single model outputs KK-dim probabilities pi=ezi/τj=1Kezj/τp_i = \frac{e^{z_i/\tau}}{\sum_{j=1}^{K} e^{z_j/\tau}}, with temperature τ\tau controlling smoothness — τ0\tau \to 0 collapses to argmax, τ\tau \to \infty approaches uniform; with cross-entropy the gradient is still pyp - y (Softmax is the multiclass logistic regression).
💡Use Cases
interview comparisons of the three (model count / parameters / expressiveness), the role of τ\tau in knowledge distillation and probability calibration, and why OvR scores are not probabilities.
Key Problems Solved
OvR trains each class against 'the rest', suffers severe class imbalance, and the KK scores are not comparable (need calibration, e.g. Platt scaling); OvO's model count explodes as (K2)\binom{K}{2} (K=100K=100 → 4950 models) with possible voting ties; Softmax trains one model end-to-end and natively outputs valid probabilities, but assumes mutually exclusive classes (use multiple binary classifiers otherwise). Temperature additionally shapes the distribution: distillation uses τ>1\tau > 1 to soften labels and transfer dark knowledge (inference at τ=1\tau = 1); τ\tau also affects confidence and calibration.
🎯5 High-Frequency Exam Points
1
OvR vs OvO: number of models (KK vs K(K1)2\frac{K(K-1)}{2}), training/inference cost, tie-breaking; how many models for K=100K=100?
2
Role of Softmax temperature τ\tau: derive the limits as τ0\tau \to 0 and τ\tau \to \infty; why use τ>1\tau > 1 in distillation?
3
Whiteboard the Softmax + cross-entropy gradient Lzi=piyi\frac{\partial L}{\partial z_i} = p_i - y_i and show it generalizes binary LR.
4
Why aren't OvR scores probabilities? How to calibrate (Platt scaling / Isotonic) and how does calibration differ from AUC?
5
The mutual-exclusion assumption: what tasks fit Softmax, why do multi-label tasks use per-class Sigmoid? When to pick OvR vs OvO vs Softmax?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "Multiclass Strategies: OvR/OvO/Softmax"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardLogistic RegressionNext CardSVM Margin & Duality

🔗 More Classic ML Knowledge Cards

AdaBoost DerivationBagging & Random ForestBaum-Welch (HMM EM)GBDT Negative Gradient