Logistic Regression for Multiclass Classification — 3 Strategies You Need to Know

One-vs-Rest, One-vs-One and Multinomial Methods

Rukshan Pramoditha
4 min readNov 30, 2023

By design, logistic regression models automatically handle binary classification problems in which the target vector (label column) has only two classes.

However, three extensions to logistic regression are available to use logistic regression for multiclass classification in which the target vector has more than two classes.

These extensions include:

  • One-vs-Rest (OvR) multiclass strategy
  • One-vs-One (OvO) multiclass strategy
  • Multinomial method

We’ll begin with the One-vs-Rest (OvR) multiclass strategy.

One-vs-Rest (OvR) multiclass strategy

When there are more than two classes in the target vector, the one-vs-rest strategy allows logistic regression to train a separate model for each class comparing with all the remaining classes. Therefore, this is also known as the One-vs-All (OvA) strategy.

This method creates one logistic regression model for each class against all other classes. If the target vector has four classes (e.g. Cat, Dog, Monkey, Bear), this strategy will create…

--

--

Rukshan Pramoditha

3,000,000+ Views | BSc in Stats | Top 50 Data Science, AI/ML Technical Writer on Medium | Data Science Masterclass: https://datasciencemasterclass.substack.com