“ Logistic Regression measures the relationship between the categorical dependent variable and one or more independent variables by estimating probabilities using a logistic function. “

Table of Contents
- What is Logistic Regression ?
- Why not Linear Regression ?
- How does Logistic Regression work ?
- Decision Boundary
- How to check model performance ?
- Summary
What is Logistic Regression ?
You already know that linear regression is used to predict continuous Y variables.
In linear regression the Y variable is always a continuous variable. If suppose, the Y variable was categorical, you cannot use linear regression model it.
So what would you do when the Y is a categorical variable with 2 classes?
Logistic regression can be used to model and solve such problems, also called as binary classification problems.
A key point to note here is that Y can have 2 classes only and not more than that. If Y has more than 2 classes, it would become a multi class classification and you can no longer use the vanilla logistic regression for that.
Another advantage of logistic regression is that it computes a prediction probability score of an event. More on that when you actually start building the models.
Why not Linear Regression ?