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