案例01|University Aspiration:Probability、Odds 與 Log Odds
案例02|Logistic Function:從 Binary Outcome 到可建模的 Logit
案例03|Sample Size 與 Maximum Likelihood Estimation
案例04|Titanic Logistic Regression:模型設定與 Predictor Significance
案例05|Titanic Confusion Matrix:Accuracy、Precision、Sensitivity、Specificity 與 F1
案例06|Lift、ROC、Residuals 與 Influential Observations
案例07|Titanic Parameter Estimates:Odds 與個別乘客 Survival Probability
案例08|Exercise 7.1:Employee Attrition Logistic Regression
案例09|GLM:用 Binary+Logit 重建 Logistic Regression
案例10|Exercise 7.2:GLM 重建 Attrition 與 House Price Models
| 核心主題 | 主要觀點/方法 | 實務用途 | 重要條件/限制/延伸 |
|---|---|---|---|
| Binary Logistic Regression | 預測 Binary Categorical Outcome 的 Probability | Churn、Attrition、Loan Outcome 等 | Continuous Outcome 應使用其他模型;本章聚焦 Binary LR |
| Probability 與 Odds | Odds=P/(1−P) | 把 Event Likelihood 轉成可進一步建模的尺度 | P 必須介於 0 與 1 |
| Logit | ln[P/(1−P)];Ylogit=β₀+β₁X₁+… | 建立 Predictors 與 Binary DV 的線性關係 | 管理溝通通常需再轉回 Probability |
| MLE | Maximum Likelihood Estimation | 估計 Logistic Regression Parameters | 原書指出需要比 MLR 更大的 Sample |
| Sample Size | >400;Holdout >800;至少 IV 數×20 | 模型建立前的資料可行性檢查 | DV 每組每 Estimated Parameter 至少 10 Observations |
| Titanic Model | 1,311 Observations;Embarked、Pclass、Sex、Age、Fare、Parch、SibSp | 完整示範 SAS VA Logistic Regression | Fare、Parch 在 p<0.05 下不顯著 |
| Confusion Matrix | TP=348、TN=686、FP=124、FN=153 | 拆解 Classification Errors | Accuracy 不反映 FP/FN 的不同成本 |
| Classification Metrics | Precision 73.73%;Sensitivity 69.46%;Specificity 84.69%;Accuracy 78.87%;F1 71.53% | 多面向評估 Predictive Performance | 不能只看單一 Metric |
| Lift 與 ROC | Lift 比較使用/不使用模型;ROC 評估 TP/FP Trade-off | 評估 Classification Effectiveness | Cut-off 不一定必須是 0.5 |
| Residual/Influence | Residual ±3 外需關注;Influence 檢查 Observation 對 Parameters 的影響 | Model Diagnostics | 不可為改善 Fit 而任意刪 Outliers |
| Odds Interpretation | Sex Female coefficient 2.606;exp=13.55 | 解讀 Predictor 與 Outcome Odds 關係 | 其他 Predictors Held Constant |
| Individual Probability | Maioni 94.69%;Rouse 4.78% | 把 Model Output 轉為管理者易懂的 Individual Profile | Probability 不是 Deterministic Outcome |
| Fit Statistics | −2LL、AIC、BIC、Pseudo R² | 比較 Model Fit 與 Complexity | Cox-Snell 0.3389 與 Nagelkerke 0.4608 差異大,原書要求謹慎使用 |
| GLM | Distribution+Link Function;Binary+Logit 可重建 LR | 將 Regression 放入更一般化 Framework | GLM 要求 Numeric Response;Survived=1、Perished=0 |
Chapter 6 的 Multiple Linear Regression(MLR)處理 Continuous Outcome;Chapter 7 改處理 Binary Categorical Outcome。原書另提 Multinomial Logistic Regression 用於兩個以上且無順序的 Categories,Ordinal Logistic Regression 用於 Low/Medium/High 等有順序結果,但本章只聚焦 Binary Logistic Regression。
原書強調模型並非 Deterministic。Customer A 可以有 92% Churn Probability,Customer B 可以有 3%,但都不是「一定」Churn 或「一定」Stay。實務上再依 Cut-off 將 Probability 轉為 Classification,而 Cut-off 不必固定為 0.5。
若直接用 Linear Regression 處理 Binary DV,Prediction 可能小於 0 或大於 1。Logit 先把 Probability 轉成 Odds,再取 Natural Log,使尺度從負無限延伸到正無限,並以 0 為中心,從而可建立 Predictors 與 Logit 的 Linear Relationship。