Online Machine Learning Quiz

100+ Objective Machine Learning Questions. Lets see how many can you answer?

Start Quiz

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