**Linear Regression** is a machine learning algorithm based on **supervised regression algorithm**. Regression models a target prediction value based on independent variables. It is mostly used for finding out the relationship between variables and forecasting. Different regression models differ based on – the kind of relationship between the dependent and independent variables, they are considering and the number of independent variables being used.

**Logistic regression** is basically a **supervised classification algorithm**. In a classification problem, the target variable(or output), y, can take only discrete values for a given set of features(or inputs), X.

Linear Regression |
Logistic Regression |
---|---|

Linear Regression is a supervised regression model. | Logistic Regression is a supervised classification model. |

In Linear Regression, we predict the value by an integer number. | In Logistic Regression, we predict the value by 1 or 0. |

Here no activation function is used. | Here activation function is used to convert a linear regression equation to the logistic regression equation |

Here no threshold value is needed. | Here a threshold value is added. |

Here we calculate Root Mean Square Error(RMSE) to predict the next weight value. | Here we use precision to predict the next weight value. |

Here dependent variable should be numeric and the response variable is continuous to value. | Here the dependent variable consists of only two categories. Logistic regression estimates the odds outcome of the dependent variable given a set of quantitative or categorical independent variables. |

It is based on the least square estimation. | It is based on maximum likelihood estimation. |

Here when we plot the training datasets, a straight line can be drawn that touches maximum plots. | Any change in the coefficient leads to a change in both the direction and the steepness of the logistic function. It means positive slopes result in an S-shaped curve and negative slopes result in a Z-shaped curve. |

Linear regression is used to estimate the dependent variable in case of a change in independent variables. For example, predict the price of houses. | Whereas logistic regression is used to calculate the probability of an event. For example, classify if tissue is benign or malignant. |

Linear regression assumes the normal or gaussian distribution of the dependent variable. | Logistic regression assumes the binomial distribution of the dependent variable. |

## Recommended Posts:

- Understanding Logistic Regression
- Identifying handwritten digits using Logistic Regression in PyTorch
- ML | Logistic Regression using Tensorflow
- ML | Logistic Regression using Python
- ML | Why Logistic Regression in Classification ?
- ML | Cost function in Logistic Regression
- ML | Logistic Regression v/s Decision Tree Classification
- ML | Kaggle Breast Cancer Wisconsin Diagnosis using Logistic Regression
- ML | Heart Disease Prediction Using Logistic Regression .
- Logistic Regression in R Programming
- Differentiate between Support Vector Machine and Logistic Regression
- Logistic Regression using Statsmodels
- Advantages and Disadvantages of Logistic Regression
- Multiple Linear Regression using R
- Linear Regression using PyTorch
- Simple Linear-Regression using R
- Linear Regression Using Tensorflow
- ML | Linear Regression
- Gradient Descent in Linear Regression
- Mathematical explanation for Linear Regression working

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.