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?
Diese Übung ist Teil des Kurses
Modeling with tidymodels in R
Interaktive Übung
Setze die Theorie in einer unserer interaktiven Übungen in die Praxis um
