Logistic Regression
97 words
1 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Logistic Regression ## Model $$ \log\left(\frac{p}{1-p}\right) = \beta_0 + \beta_1 x_1 + \cdots + \beta_k x_k $$ $$ p = \frac{e^{\beta_0 + \beta_1 x_1 + \cdots}}{1 + e^{\beta_0 + \beta_1 x_1 + \cdots}} $$ ## Maximum Likelihood Estimation Likelihood: $L(\beta) = \prod_{i: y_i=1} p_i \prod_{i: y_i=0} (1-p_i)$ Maximi...

Logistic Regression
Model
log(1−pp)=β0+β1x1+⋯+βkxk p=1+eβ0+β1x1+⋯eβ0+β1x1+⋯Maximum Likelihood Estimation
Likelihood: L(β)=∏i:yi=1pi∏i:yi=0(1−pi)
Maximized using IRLS (iteratively reweighted least squares).
Model Evaluation
- Deviance: −2ln(L) (compare to null model)
- AIC: Deviance +2p
- ROC curve: Plot TPR vs FPR. AUC = area under curve.
- Confusion matrix: Accuracy, precision, recall, F1 Join Discord PreviousGeneralized Linear ModelsNextMixed Effects Models