poly_rec <- recipe(conductivity ~., elyte_data) |>
update_role(id, new_role = 'id') |>
# bin additives
step_other(additive, other = 'others_combined', threshold = 0.05) |>
step_zv(all_predictors()) |>
# create squared columns
step_poly(contains('p'), degree = 2, options = list(raw = TRUE)) |>
# create interactions between all numerical columns
step_interact(terms = ~ ends_with("poly_1"):ends_with("poly_1"))