set.seed(313)
examples <- matrix(runif(40), ncol = 2)
examples <- data.frame(examples)
rec <- recipe(~ X1 + X2, data = examples)
logit_trans <- rec %>%
step_logit(all_numeric_predictors())
logit_obj <- prep(logit_trans, training = examples)
transformed_te <- bake(logit_obj, examples)
plot(examples$X1, transformed_te$X1)
tidy(logit_trans, number = 1)
tidy(logit_obj, number = 1)
Run the code above in your browser using DataLab