Logistic Regression
Explore the theory and application of logistic regression for binary and multi-class classification. Understand how probabilities are estimated, cost functions are minimized using gradient descent, and how regularization improves model performance. Gain practical skills using scikit-learn to train and evaluate logistic regression models on real datasets.
Classification
Classification problems involve assigning labels or classes to instances, such as determining whether an email is spam or not spam. Logistic regression is the basic algorithm used for binary classification problems. It can be extended for multi-class and multi-label classification problems. In this lesson, we will cover the mathematical working of logistic regression and how it can be used in scikit-learn for real-time problems.
Logistic regression
Logistic regression allows us to estimate the probability, , of class membership of a given instance. The probability will range between 0 and 1. Logistic regression is also known in the literature as Logit regression, Maximum-Entropy Classification (MaxEnt), or the log-linear classifier.
We saw that multivariate linear regression comes up with the following equation in higher dimensions.
…
Here = 1
In logistic regression, we pass the calculated predicted value through a logistic or sigmoid function .
=
Where,
=
= = ...