Hi,
I have the below code where i have three attributes i am trying to tune. They are all called the same thing. Does anyone know how i would fit them into tuning grid?
For example the tuning paramter for PCA, correlation and bucketing of character attributes is called threshold
. I would like to somehow identify each tuning parameter associated with each attribute.
Below is the psuedocode
library(tidymodels)
library(tidyverse)
library(modeldata)
data("attrition")
mod_data <- attrition
att_rec <-
recipe(Attrition ~ ., data = mod_data) %>%
step_other(all_nominal_predictors(), threshold = tune()) %>%
step_unknown(all_nominal_predictors()) %>%
step_dummy(all_nominal_predictors(), one_hot = TRUE) %>%
step_zv(all_predictors()) %>%
step_corr(all_numeric_predictors(), threshold = tune()) %>%
step_pca(all_numeric_predictors(), threshold = tune())
lasso_spec <- linear_reg(penalty = tune(), mixture = 1) %>%
set_engine("glmnet")
lambda_grid <- grid_regular(penalty(),
threshold() # but we have three thresholds so how do we set them
levels = 50)
# Add to the workflow and run.......
Any help would be greatly appreciated.
Thank you for your time