library(recipes)
modelling.approach <- recipe(Churn ~ ., data = trainingdata) %>%
step_discretize(Current_Equipment_Days, options = list(cuts = 4)) %>%
step_discretize(Monthly_Rec_Charge, options = list(cuts = 4)) %>%
step_discretize(Monthly_Revenue, options = list(cuts = 5)) %>%
step_discretize(Monthly_Minutes, options = list(cuts = 5)) %>%
step_discretize(Perc_Change_Minutes, options = list(cuts = 5)) %>%
step_dummy(all_nominal(), -all_outcomes()) %>%
step_center(all_predictors()) %>%
step_scale(all_predictors()) %>%
step_YeoJohnson(all_numeric())
modelling.approach %>%
prep() %>%
bake(., trainingdata) %>%
glimpse()
write.csv(trainingdata,"C:Users//User//Tony//modellingapproach.csv", row.names = FALSE)
Код modelling.approach работает отлично. Когда я запускаю glimpse (), он дает мне желаемый результат. Однако, когда я вспоминаю данные с использованием read.csv ('modellingapproach.csv'), я понимаю, что данные все еще остаются теми же, что и до процесса выпечки. Есть идеи?