Logistic Regression for Multiclass Classification — 3 Strategies You Need to Know
One-vs-Rest, One-vs-One and Multinomial Methods
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…