📜  毫升 |线性回归与逻辑回归

📅  最后修改于: 2022-05-13 01:57:05.625000             🧑  作者: Mango

毫升 |线性回归与逻辑回归

线性回归是一种基于监督回归算法的机器学习算法。回归基于自变量对目标预测值进行建模。它主要用于找出变量之间的关系和预测。不同的回归模型基于因变量和自变量之间的关系类型、它们正在考虑的以及使用的自变量的数量而有所不同。
逻辑回归基本上是一种监督分类算法。在分类问题中,目标变量(或输出)y 对于给定的一组特征(或输入)X 只能取离散值。

Linear RegressionLogistic 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.