Fit and augment
With your lr_workflow ready to go, you can fit it to the test data to make predictions.
For model assessment, it is convenient to augment your fitted object by adding predictions and probabilities using augment().
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Feature Engineering in R
คำแนะนำการฝึกหัด
- Fit the workflow to the
traindata. - Augment the
lr_fitobject using thetestdata to get it ready for assessment.
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ
ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์
# Fit the workflow to the train data
lr_fit <-
___(___, data = train)
# Augment the lr_fit object
lr_aug <-
___(lr_fit, new_data = ___)
lr_aug