Logistic Regression

Logistic Regression

Logistic regression models the probability that Y belongs to a particular category

The Logistic Model

We are attempting to model the relationship between p(X)=Pr(Y=1|X) and X
Logistic Function:

p(X)=eβ0+β1X1+eβ0+β1X

Fit the model using maximum likelihood

Estimating the Regression Coefficients

likelihood function:

l(β0,β1)=i:yi=1p(xi)i:yi=0(1p(xi))

Estimates for β0^ and β1^ are chosen to maximize the likelihood function

Multiple Logistic Regression

p(X)=eβ0+β1X1++βpXp1+eβ0+β1X1++βpXp

Use maximum likelihood to estimate β0,β1,,βp

Multinomial Logistic Regression

Extending two-class logistic regression to K>2 classes
One class is selected as the baseline K, then the model becomes:

Pr(Y=k|X=x)=eβk0+βk1x1++βkpxp1+l=1K1eβl0+βl1x1++βlpxp

for k=1,,K1 and

Pr(Y=K|X=x)=11+l=1K1eβl0+βl1x1++βlpxp

Alternatively, there's softmax coding:

Pr(Y=k|X=x)=eβk0+βk1x1++βkpxpl=1Keβl0+βl1x1++βlpxp

Sources: 1

Connect With Me!