-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logarithmic spacing in grid search during tuning #123
Comments
The tuning is based on functionalities from One way to achieve the requested logarithmic spacing is by applying transformations (see also https://mlr3book.mlr-org.com/optimization.html#tuning). To be more specific, you can use par_grids = list(
"ml_g" = paradox::ps(lambda=paradox::p_dbl(-5, 1, trafo = function(x) 10^x)),
"ml_m" = ParamSet$new(list(
ParamDbl$new("lambda", lower = 0.05, upper = 0.1))))
tune_settings = list(terminator = trm("evals", n_evals = 100),
algorithm = tnr("grid_search", resolution = 7),
rsmp_tune = rsmp("cv", folds = 5),
measure = list("ml_g" = msr("regr.mse"),
"ml_m" = msr("regr.mse")))
doubleml_plr$tune(param_set = par_grids, tune_settings = tune_settings)
doubleml_plr$tuning_res
doubleml_plr$tuning_res$X1$ml_g[[1]]$tuning_result[[1]]$tuning_archive %>% arrange(lambda) This way you get the requested logarithmic spacing for the |
This is great, thank you! |
When tuning LASSO, I didn't find a way to specify the grid with logarithmic spacing, even though it seems natural to me. The default is equal spacing.
The text was updated successfully, but these errors were encountered: