# NOT RUN {
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)
ss_trans <- rec %>%
step_center(carbon, hydrogen) %>%
step_scale(carbon, hydrogen) %>%
step_spatialsign(carbon, hydrogen)
ss_obj <- prep(ss_trans, training = biomass_tr)
transformed_te <- bake(ss_obj, biomass_te)
plot(biomass_te$carbon, biomass_te$hydrogen)
plot(transformed_te$carbon, transformed_te$hydrogen)
tidy(ss_trans, number = 3)
tidy(ss_obj, number = 3)
# }
Run the code above in your browser using DataLab