Baseline
Continuing with the attrition_num
dataset, you will create a baseline with a plain recipe to assess the effects of additional feature engineering steps. The attrition_num
data, the logistic regression lr_model
, the user-defined class-evaluate()
function, and the train
and test
splits have already been loaded for you.
Este exercício faz parte do curso
Feature Engineering in R
Instruções do exercício
- Bundle the model and recipe into a workflow.
- Augment the fitted workflow to get it ready for assessment.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
lr_recipe_plain <- recipe(Attrition ~., data = train)
# Bundle the model and recipe
lr_workflow_plain <- workflow() %>%
___(lr_model) %>%
___(lr_recipe_plain)
lr_fit_plain <- lr_workflow_plain %>%
fit(train)
# Augment the fit workflow
lr_aug_plain <- lr_fit_plain %>%
___(___)
lr_aug_plain %>%
class_evaluate(truth = Attrition,estimate = .pred_class,
.pred_No)