Logistic Regression
Logistic Regression
Regression
What is Logistic
• Regression?
Learning
• Prediction
For example, when a person applies a loan from a bank, bank is interested
in predicting whether the applicant will default in future.
Due to the nature of the problem, the prediction will fall in [0,1].
By the rule of thumb, if the prob. is greater than equal to 0.5, then we can
label the applicant as default.
Logistic Regression
Logistic
Regression
The outcome probability is modeled
using the logistic function, also known as
the sigmoid function.
Here's the logistic function:
This probability represents the likelihood that the input belongs to one
of the two classes.
Once trained, the logistic regression model can predict the probability
of new instances belonging to one of the two classes, and based on a
chosen threshold (often 0.5), it can make binary predictions.
Decision Boundary
For Example, We have 2 classes, let’s take them like cats and dogs (1
— dog
, 0 — cats).
If our prediction returned a value of 0.2 then we would classify the observation
as Class 2(CAT).