Exploring recipe objects
The first step in feature engineering is to specify a recipe object with the recipe() function and add data preprocessing steps with one or more step_*() functions. Storing all of this information in a single recipe object makes it easier to manage complex feature engineering pipelines and transform new data sources.
Use the R console to explore a recipe object named telecom_rec, which was specified using the telecom_training data from the previous chapter and the code below.
telecom_rec <- recipe(canceled_service ~ .,
data = telecom_df) %>%
step_log(avg_call_mins, base = 10)
Both telecom_training and telecom_rec have been loaded into your session.
How many numeric and nominal predictor variables are encoded in the telecom_rec object?
Questo esercizio fa parte del corso
Modeling with tidymodels in R
Esercizio pratico interattivo
Passa dalla teoria alla pratica con uno dei nostri esercizi interattivi
Inizia esercizio