In statistics, the logistic model is used to model the probability of a certain class or event existing such as pass/fail, win/lose, alive/dead or healthy/sick.

Logistic is very useful when we have a dependent variable is in binary format say yes or no, true or false, 0 or 1. Example, let’s say that we want to predict whether the email received is a spam mail or a genuine mail. Logistic is performed on categorical data.

For example when we want to predict the score of student we will use linear regression but when we want to determine pass and fail category of student we will use logistic regression. In logistic regression we set a decision boundary. Decision boundary is nothing but a factor that tells us where the data belongs to in dataset.

Basically, if we see types of Logistic regression there are two types:

1. Binary Logistic regression
2. Multiclass Logistic regression

## Binary Logistic Regression:

Binary logistic regression deals with only two values either true or false. When a decision boundary is drawn the data above the boundary is classified as class 0 and data below boundary is classified as class1.

## Multiclass Logistic Regression:

Multiclass logistic regression is done when we have more than two classes in our dataset for example if we consider an example for zoo where we have more two categories of animals like mammals, reptiles, birds. So, in such case we will use multiclass logistic regression. When a decision boundary is drawn in multiclass logistic regression there are multiple boundaries that define the class for each categorical data.

## Evaluation of Logistic Regression:

We use confusion matrix for finding the accuracy of our model created as well as to find the errors in our prediction it is calculated as TP+FP/n gives us the accuracy whereas TN+FN/n gives us error percent in our model.