Logistic Regression

Logistic Regression Formula

The logistic regression model is used to model the probability of a binary outcome. The formula for the logistic regression model is:

P(Y=1|X)=11+e(β0+β1X1+β2X2++βnXn)

Where:

The logit function (log-odds) is given by:

logit(P)=ln(P1P)=β0+β1X1+β2X2++βnXn

Where:

Likelihood and Log-Likelihood Functions for Logistic Regression

Likelihood Function

L(β)=i=1nP(Yi|Xi)Yi(1P(Yi|Xi))1Yi

Where:

P(Yi|Xi)=11+e(β0+β1Xi1+β2Xi2++βnXin)

Log-Likelihood Function

(β)=i=1n[Yiln(P(Yi|Xi))+(1Yi)ln(1P(Yi|Xi))]

Where:

P(Yi|Xi)=11+e(β0+β1Xi1+β2Xi2++βnXin)


Maximum Likelihood Estimation (MLE)

Estimation technique used to estimate parameters or coefficients for many machine learning models (Eg: Logistic Regression).

Pasted image 20240718162258.png

Steps:

Pros

Cons