Linear Regression and Logistic Regression

来源:互联网 发布:matlab cell转成矩阵 编辑:程序博客网 时间:2024/04/30 20:36

Linear Regression

Linear regression uses the general linear equation Y=b0+(biXi)+ϵwhere Y is a continuous dependent variable and independent variables Xi are usually continuous (but can also be binary, e.g. when the linear model is used in a t-test) or other discrete domains. ϵϵ is a term for the variance that is not explained by the model and is usually just called "error". Individual dependent values denoted by Yj can be solved by modifying the equation a little: Yj=b0+(biXij)+ϵj

Image result


Logistic Regression

Logistic regression is another generalized linear model (GLM) procedure using the same basic formula, but instead of the continuous Y, it is regressing for the probability of a categorical outcome. In simplest form, this means that we're considering just one outcome variable and two states of that variable- either 0 or 1.

In other words, Y is a categorical variable, Xi are usually continuous


The equation for the probability of Y=1 looks like this:

P(Y=1)=11+e(b0+(biXi))


阅读全文
0 0
原创粉丝点击