1. 案例定位

原書 Exercise 8.2,以 employee_attrition Dataset 建立 Decision Tree 並與 Chapter 7 Logistic Regression 比較。

2. 學習目標

完成 Model Interpretation、Confusion Matrix Analysis 與 Cross-model Comparison。

3. 案例情境

Target 為 Attrition。學生需由 SAS VA 建立 Decision Tree,判讀 Predictors 與 Classification Performance。

4. 開始資料

項目 原書要求
Dataset employee_attrition
Target Attrition
比較模型 Chapter 7 Logistic Regression
評估 Confusion Matrix、Accuracy、False Negatives、False Positives

5. 分析方法

建立 Decision Tree → 解讀 Tree 與 Predictors → 建 Confusion Matrix → 分析 Errors → 與 Chapter 7 Logistic Regression 比較。

6. 計算結果

原書 Exercise 未在題目中提供固定 Output 或答案;結果依實際 SAS VA Model 而定,不自行補造。

7. 結果分析與管理解讀

比較重點不只是 Overall Accuracy,也包括錯誤類型、Predictor Interpretation 與模型是否能在 Unseen Data 維持表現。

8. AI Prompt

根據我貼上的 Employee Attrition Decision Tree 與 Confusion Matrix Output,逐項解讀 Predictor、Accuracy、FP、FN,並與我提供的 Chapter 7 Logistic Regression Output 比較;缺少的數值請標示缺失。

9. 思考/What-if

若 Decision Tree 比 Logistic Regression 容易解釋,但 Accuracy 稍低,管理者應如何評估?

參考解答: 應同時考慮 Predictive Performance、錯誤成本、Interpretability 與實際部署需求,而不是只看單一指標。

10. 資料說明