Going through tidymodels - get started -preprocessing with recipes
After the step
flights_rec <-
recipe(arr_delay ~ ., data = train_data) %>%
update_role(flight, time_hour, new_role = "ID")
we can see the result in
summary(flights_rec)
as
variable
<chr>
type
<chr>
role
<chr>
source
<chr>
dep_time numeric predictor original
flight numeric ID original
origin nominal predictor original
dest nominal predictor original
air_time numeric predictor original
distance numeric predictor original
carrier nominal predictor original
date date predictor original
time_hour date ID original
arr_delay nominal outcome original
but after the following steps when we add step_date(), step_holiday() etc
flights_rec <-
recipe(arr_delay ~ ., data = train_data) %>%
update_role(flight, time_hour, new_role = 'ID') %>%
step_date(date, features = c('dow', 'month')) %>%
step_holiday(
date,
holidays = timeDate::listHolidays('US'),
keep_original_cols = FALSE
) %>%
step_dummy(all_nominal_predictors()) %>%
step_zv(all_predictors)
nothing changes in summary(flights_rec), there is no indication that 'dow', 'month', 'holidays' have been added and 'date' removed.
Is there some other function that shows the effects of steps?