Pages

Monday, 4 March 2019

Difference between Linear Regression and Logistic Regression

Linear Regression and Logistic Regression have a lot of similarities and differences. Linear Regression is used to solve regression problems while Logistic Regression is used to solve classification problems. Below is the comparison of both the algorithms:

1. Definition

Linear Regression: Predicts a continuous dependent variable based on the values of independent variables.
Logistic Regression: Predicts a categorical / discrete dependent variable based on the values of independent variables.

2. Curve

Linear Regression: Straight Line. Equation of Line: y = mx + c
Logistic Regression: Sigmoid Curve (S Curve): Equation of S Curve: log(y/(1-y)) = mx + c

3. Output

Linear Regression: Predicts a continuous variable (example: What will be the GDP of the country this year?)
Logistic Regression: Predicts a categorical / discrete variable (example: Whether it will rain today or not?)

4. Accuracy Measurement Techniques

Linear Regression: Mean Absolute Error, Mean Square Error, Root Mean Square Error, R Square Method, Adjusted R Square Method
Logistic Regression: Confusion Matrix, Classification Report, Accuracy Score, F1 Score, Precision, Recall, ROC (Receiver Operating Characteristic), AUC (Area Under the ROC Curve)

No comments:

Post a Comment

About the Author

I have more than 10 years of experience in IT industry. Linkedin Profile

I am currently messing up with neural networks in deep learning. I am learning Python, TensorFlow and Keras.

Author: I am an author of a book on deep learning.

Quiz: I run an online quiz on machine learning and deep learning.