vimpute()R/vimpute_tune_control.R
vimpute_tune_control.RdBundles the tuning controls that vimpute(tune = TRUE) previously
hard-coded: the evaluation budget, the cross-validation folds of the
tuning resampling, the mlr3tuning tuner and its batch size. Pass the
result to vimpute(tune_control = ). With m > 1 the control applies to
the single tuning run (run 1), whose parameters all m imputations share.
vimpute_tune_control(
budget = NULL,
folds = NULL,
tuner = "random_search",
batch_size = 1L
)NULL or a single positive integer: the number of
configurations the tuner evaluates. NULL (default) keeps the
per-learner, data-size-dependent budgets of the built-in search spaces
(see vimpute_search_space()).
NULL or a single integer >= 2: the cross-validation folds
used during tuning (capped by what the data supports). NULL (default)
keeps the heuristic of 5 folds up to 3000 rows, 3 above.
Single string: an mlr3tuning tuner id, e.g.
"random_search" (default) or "grid_search". Tuners beyond the
defaults may require additional packages.
Single positive integer: configurations evaluated per
tuner batch. The default 1 keeps the random-search RNG consumption
machine-independent, so seed = reproduces tuning results everywhere;
larger values evaluate in batches (faster with a parallel
future::plan, still reproducible for a fixed value).
An object of class vimpute_tune_control.
Nested resampling is intentionally not offered: the goal of tuning inside
an imputation loop is good imputations, not an unbiased estimate of the
learner's generalisation error, and the tuned-vs-default comparison that
vimpute() runs on a fresh resampling already guards against tuning that
overfits the folds.