This article was written by Madhu Sanjeevi (Mady).
In the previous story we talked about Linear Regression for solving regression problems in machine learning, This story we will talk about Logistic Regression for classification problems.
You may be wondering why the name says regression if it is a classification algorithm, well,It uses the regression inside to be the classification algorithm.
Classification : Separates the data from one to another. This story we talk about binary classification ( 0 or 1). Here target variable is either 0 or 1. Goal is to find that green straight line (which separates the data at best). So we use regression for drawing the line, makes sense right?
We only accept the values between 0 and 1 (We don’t accept other values) to make a decision (Yes/No). There is an awesome function called Sigmoid or Logistic function, we use to get the values between 0 and 1. This function squashes the value (any value) and gives the value between 0 and 1.
So far we know that we first apply the linear equation and apply Sigmoid function for the result so we get the value which is between 0 and 1. The hypothesis for Linear regression is h(X) = θ0+θ1*X.
How does it work?
We got the Logistic regression ready, we can now predict new data with the model we just built.
To read the whole article, with examples and illustrations, click here.
Posted 1 March 2021
© 2021 TechTarget, Inc.
Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles
You need to be a member of Data Science Central to add comments!
Join Data Science Central