配適並擴充
現在該來配適並擴充模型了。你正使用所有可用的變數,並且對結果有一些預期。這個相對較大的模型能勝過更簡單的模型嗎?檢視 lr_augment 物件,看看你的模型表現如何。
本練習屬於課程
R 的特徵工程
練習說明
- 對配適後的物件進行擴充,以評估模型。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
lr_fit <- lr_workflow %>%
fit(test)
# Augment the fit object to assess the model
lr_aug <- lr_fit %>%
___(test)
lr_aug %>% class_evaluate(truth = Attrition,
estimate = .pred_class,
.pred_No)
lr_aug