tidymodels: tuning scale_pos_weight in xgboost

Hi @Gus & others,

I still don't quite understand this. If I put the scale_pos_weight = tune() statement in the set_engine part of the model specification, how do I actually have it tune over some space when using the default (unspecified) grid?

xgb_rs.all <- tune_race_anova(
  pt_xgb_workflow2,
  resamples = cv_all,
  grid = 100,
  metrics = my_metrics,
  control = control_race(verbose_elim = TRUE)
)

The above fails (Warning message: This tuning result has notes. Example notes on model fitting include: internal: Error: Can't subset columns that don't exist. ✖ Column `scale_pos_weight` doesn't exist. ).

  1. Is there a default range over which tidymodels will search the scale_pos_weight space? I do know that the general recommendation is neg/pos.
  2. How do I specify the range for one hyperparameter if I want to make use of the defaults for other hyperparameters?
  3. Where can I find what space is being considered for each hyperparameter?

Thanks!!!!

1 Like