# NOT RUN {
library(modeldata)
data(biomass)
biomass_tr <- biomass[biomass$dataset == "Training",]
biomass_te <- biomass[biomass$dataset == "Testing",]
rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur,
data = biomass_tr)
int_mod_1 <- rec %>%
step_interact(terms = ~ carbon:hydrogen)
int_mod_2 <- rec %>%
step_interact(terms = ~ (matches("gen$") + sulfur)^2)
int_mod_1 <- prep(int_mod_1, training = biomass_tr)
int_mod_2 <- prep(int_mod_2, training = biomass_tr)
dat_1 <- bake(int_mod_1, biomass_te)
dat_2 <- bake(int_mod_2, biomass_te)
names(dat_1)
names(dat_2)
tidy(int_mod_1, number = 1)
tidy(int_mod_2, number = 1)
# }
Run the code above in your browser using DataLab