EasyDeepLearn

'multinomial' vs 'ovr' setting in scikit-learn's LogisticRegression — what changes?

medium

Answer

  • '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