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 ejercicio forma parte del curso
Feature Engineering in R
Instrucciones del ejercicio
- Bundle the model and recipe into a workflow.
- Augment the fitted workflow to get it ready for assessment.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
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)