1. 案例定位

R Decision Tree Modelling。

2. 學習目標

建立 Tree、解讀 Splits 與 Variable Importance。

3. 案例情境

原書展示 Decision Tree 與 Variable Importance,Exercise 11.3 要求以 employee_attrition 預測 Attrition。

4. 開始資料

Figures 11.16–11.17、employee_attrition Dataset。

5. 分析方法

Train Tree → Inspect Structure → Variable Importance → Evaluate Predictions。

6. 計算結果

Exercise 11.3 無固定 Output,需由 R 實際運算。

7. 結果分析與管理解讀

Tree 提供可視化 Rules,但仍需檢查 Generalization。

8. AI Prompt

依 Exercise 11.3 建立 Decision Tree 解讀框架,不虛構 Split Variables 或 Performance。

9. 思考/What-if

Training Tree 很深且準確代表模型很好嗎?

參考解答: 不一定;可能 Overfit,需要 Test Data 檢驗。

10. 資料說明