'multinomial' vs 'ovr' setting in scikit-learn's LogisticRegression — what changes?
mediumAnswer
- 'multinomial' fits a joint softmax model over all K classes with a single log-loss objective — the natural probabilistic model for multi-class.
- 'ovr' trains K independent binary logistic regressions (class k vs the rest) and normalizes per-example at prediction time.
- Multinomial usually gives better-calibrated probabilities and slightly better accuracy; OvR is simpler and lets you look at per-class binary models but doesn't guarantee coherent probabilities.
Check yourself — multiple choice
- 'multinomial' means naive Bayes
- 'multinomial' fits a joint softmax model; 'ovr' fits K independent binary models
- They are always identical
- 'ovr' only works for regression
multinomial = joint softmax model. ovr = K one-vs-rest binary models.
#logistic-regression#multiclass#classification
Practise Supervised Learning
215 interview questions in this topic.
Related questions
- One-vs-Rest, One-vs-One, and softmax — how do you choose for multi-class?
- Why do we use cross-entropy (log loss) instead of MSE for classification?
- Write out the softmax function and its main property.
- When would LDA outperform logistic regression?
- Macro vs micro vs weighted averaging in multi-class metrics — how do you choose?
- What is top-k accuracy and when do you use it?