What is the difference between linear regression and logistic regression

0 votes

When we have to predict the value of a categorical (or discrete) outcome we use logistic regression. I believe we use linear regression to also predict the value of an outcome given the input values.

Then, what is the difference between the two methodologies?

Feb 2 in Machine Learning by Dev
• 6,000 points

1 answer to this question.

0 votes
Hi Dev, to answer your question
Linear Regression and Logistic Regression are both Supervised Machine Learning Algorithms.
The basic difference between the Logistic and Linear Regression are :

1) Prediction
Linear Regression is used for making predictions when the outcome is continuous in nature.
Eg. Predicting price of the house based on several features.
Logistic regression is used for making predictions when the outcome is nominal or categorical in nature.

Eg. Predicting whether a person has diabetes or not thus classifying into Yes for having diabetes and No for not having diabetes.

2) Assumptions

Linear regression assumes a linear relation between an independent variable and dependent variable.Linear Regression is also sensitive to outliers.

Logistic regression on the other hand does not require a linear relationship between dependent and independent variables.
Because the outliers are tapered by the sigmoid function, outliers have little impact on logistic regression models. However, the presence of severe outliers may have an impact on the model's performance, decreasing it.

3) Equation
Linear regression equation is given simply by:

Y = mX + C,

Logistic regression equation is given by:

Y = eX + e-X

4) Way of reducing errors is different
Linear regression uses ordinary least squares to minimize error and find the best fit for the model.

Logistic regression uses a maximum likelihood method to minimize the errors.

Hope this helps.
answered Feb 2 by Nandini
• 5,480 points

Related Questions In Machine Learning

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is LassoLars? - Linear regression

LassoLars is a lasso model implemented using ...READ MORE

answered May 22, 2019 in Machine Learning by Basu
0 votes
1 answer

What is the difference between Coefficient of Regression and Elasticity

It is questionable. I'll simplify the model ...READ MORE

answered Apr 4 in Machine Learning by Nandini
• 5,480 points
0 votes
1 answer
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP