You are currently viewing What is the Logistic Regression in 2minutes?

What is the Logistic Regression in 2minutes?

Logistic regression is a method for classifying data into discrete outcomes. For example, the classification of an email as spam or not. It is a statistical model that in its basic form uses a logistic function to model a binary dependent variable, although many more complex extensions exist. In regression analysis, logistic regression (or logit regression) is estimating the parameters of a logistic model (a form of binary regression).

The classification problem is just like the regression problem, except that the values we now want to predict take only a small number of discrete values. For instance, if we are trying to build a spam classifier for email, then x(i) may be some features of a piece of email, and y may be 1 if it is a piece of spam mail, and 0 otherwise. Hence, yε{0,1}. 0 is also called the negative class, and 1 is a positive class, and they are sometimes also denoted by the symbols “-” and “+”.

Intuitively, it doesn’t make sense for hΘ(x) to take values larger than 1 or smaller than 0 when we know y ε {0,1}. To fix this, let’s change the form of our hypothesis hΘ(x) to satisfy 0 ≤ hΘ(x) ≤ 1. This is accomplished by plugging ΘTx into the “Sigmoid Function”, also called the “Logistic Function”.

sigmoid function

Thus our logistics regression hypothesis function compared to simple linear regression looks like this:

Well, there’s many more to it, which will be covered later, so if you want to be updated with such content in simple and easy language, don’t forget to follow us.

If you want to access the Best Handouts on Machine Learning Algorithms with hands-on coding experience on amazing projects, Checkout my Data Science course from here: