One of the most famous definition by Tom Mitchell states machine learning as “a computer program of performance P is said to learn from a set of tasks T and experience E when the performance P of improves with task T over experience E”. Building and training algorithms that can learn the problem in hand is basically the whole idea of machine learning. They are divided into regression and classification problems. When the output is in a continuous range for eg. Price of a car, amount of rainfall etc. then it is a regression problem. Whereas when the output is categorical say, it is a fraudulent transaction or not then it is called classification problem. In the series of articles, I will be giving intuitions on the different type of algorithms that are used extensively to solve problems. We will be discussing about one of the most used classification algorithm Logistic Regression in this article. Let’s start classifying! ☺

What does a linear regression algorithm do? It tries to get an output that is numerical in nature so that the loss or residual when compared to the actual value is as low as possible. Logistic regression almost works on the principle. But instead of output being any numeric value, we want our output between 0 and 1. To tackle this, let’s change the form for our hypotheses to satisfy the condition 0≤*hθ*(*x*)≤1. Sigmoid function is a function that helps to transform a linear function to a value between 0 and 1. Since the value is between 0 and 1 it can be related to the probability value associated with a particular class. Let’s consider a linear function having n variables x1to xn. Let theta be the coefficient or weight associated with the variable in the linear function.