Kom igångKom igång gratis

Building a reduced model

Variable importance analysis helped you identify the most predictive features from the attrition dataset. Based on it, you will build a drastically reduced model with only three variables: OverTime, DistanceFromHome, and NumCompaniesWorked and compare its performance to the full model baseline. The metrics you estimated for the full model are stored in aug_full.

All data, along with the train and test splits, is available in your environment.

Den här övningen är en del av kursen

Feature Engineering in R

Visa kurs

Interaktiv övning med praktiskt arbete

Testa den här övningen genom att slutföra den här exempelkoden.

# Create a recipe using the formula syntax that includes only OverTime, DistanceFromHome and NumCompaniesWorked as predictors
recipe_reduced <-
  ___(Attrition ~ ___ + ___ + ___, data = train)

# Bundle the recipe with your model
workflow_reduced <-
  workflow() %>%
  add_model(model) %>%
  ___
Redigera och kör kod