In this blog, we will discuss about how Logistic Regression can solve the multiclass classification problem.

As we all know, Logistic Regression is a machine learning classification algorithm used to predict binary outcomes for a given set of independent variables.

OneVsRest(OvR in short, also referred to as One-vs-All or OvA) is a heuristic method for using binary classification algorithms for multi-class classification.

Let’s discuss how the OneVsRest or OneVsAll works!!!

suppose, if we want to solve a binary classification problem using logistic regression where the data will be linearly separable so we try to draw a best fit line in between them and we classify the 2 classes. what If we have more than 2 classes?? still, can we solve this problem using logistic regression? the answer is Yes!.

**If Yes, then How does it Work?**

Let’s consider F1,F2,F3 are our independent features, Output is dependent feature. the output has 3 classes those are O1,O2 and O3. Based on input features I1,I2,I3, output belongs O1 class and based on I4,I5,I6 features output belongs O2 class. the similarly based on features I7,I8,I9 the output belongs O3 class as shown in below table.