Control cross-validation for greedy CI model tuning
Source:R/predict_ci_tree_terminal_mean.R
control_ci_tune.RdCreates a control object for tune_ci_tree() and tune_ci_forest(). The
defaults keep tuning sequential and memory-light, while optional settings can
save validation predictions, fitted fold models, extraction results, and
request future-based parallel execution when the user has configured a
future backend externally.
Usage
control_ci_tune(
verbose = FALSE,
allow_par = TRUE,
parallel_over = c("resamples", "everything"),
save_pred = FALSE,
save_fit = FALSE,
extract = NULL,
pkgs = NULL,
num_cores = 1L
)Arguments
- verbose
Logical; print fold-level progress.
- allow_par
Logical; allow future-based parallel execution when
num_cores > 1. This requires the suggested packagefuture.apply.- parallel_over
Parallelization strategy.
"resamples"and"everything"are currently accepted; both are executed over grid/resample tasks.- save_pred
Logical; save validation predictions for
ci_collect_predictions().- save_fit
Logical; save fitted fold-level models.
- extract
Optional function applied to each successfully fitted fold-level model. For forests, the function receives a list with
forestandsurrogatecomponents.- pkgs
Optional character vector of packages to load on workers. Kept for API compatibility with parallel workflows.
- num_cores
Compatibility gate for parallel execution. Worker counts are controlled by the user's active future plan.