In our day-to-day life we come across many problems in which we have certain problems that revolves around choosing a category such as pass/fail, win/lose, alive/dead ,healthy/sick ,Yes/No, etc. It’s like picking up a single choice out of two choice. Decision making plays an important role in our life and selecting any of the choice has its own consequences.
By reading the above stuff’s, you may dwell with the question whether to proceed with this blog or skip it?
Make a Choice.
Come on lets dive in assuming that you have chosen the YES Category. It was a good choice. It was an easy task for you but what if I have asked you that whether a random person with your age is likely to read my blog or not? You may have answered any choice but how would a machine solve the same problem?
For a machine to answer this question it needs a lots of Data with the labels(Outcome variable i.e., Yes/No)and learns from it. This type of machine learning is generally called as Supervised Learning. In this case lots of data with person’s age and whether he has read the blog or not(Yes/No). Let’s dive inside the machine’s mind.
Logistic Regression is the supervised machine learning technique that is used for classification problems. It is used for classifying problems such as
- Binary Classification(Classifying the two categories problem)-Whether you we read my blog or not?(1-Will read my blog,0-Does not read my blog)
- Multi-class Classification(Classifying the problem with more than two categories)-What would be your rating for my blog out of five?(1-verybad,2-poor,3-Nice,4-good,5-verygood)
In this blog lets deal with binary classification problem to learn about how Logistic Regression works.
The data points are shown below. Let’s see how the Logistic Regression predict.
Before Predicting Let’s understand how the Algorithm works.
Logit function is a S-curved or Sigmoid function that scales value between 0 & 1. This is how a Logit function resembles in a 2-Dimensional space.
The shape of the Sigmoid curve depends on the two parameters namely:
- m — The Slope of the curve.
- c — The Intercept.