Extract inner tuning results of nested resampling. Implemented for mlr3::ResampleResult and mlr3::BenchmarkResult. The function iterates over the AutoTuner objects and binds the tuning results to a data.table::data.table(). AutoTuner must be initialized with store_tuning_instance = TRUE. For mlr3::BenchmarkResult, the number of the experiment is added to the table.

extract_inner_tuning_results(x)

Arguments

x

(mlr3::ResampleResult | mlr3::BenchmarkResult)
Must contain an AutoTuner.

Value

data.table::data.table().

Examples

task = tsk("iris") search_space = ParamSet$new( params = list(ParamDbl$new("cp", lower = 0.001, upper = 0.1)) ) at = AutoTuner$new( learner = lrn("classif.rpart"), resampling = rsmp("holdout"), measure = msr("classif.ce"), terminator = trm("evals", n_evals = 5), tuner = tnr("grid_search"), search_space = search_space, store_tuning_instance = TRUE) resampling_outer = rsmp("cv", folds = 2) rr = resample(task, at, resampling_outer, store_models = TRUE) extract_inner_tuning_results(rr)
#> cp learner_param_vals x_domain classif.ce #> 1: 0.023 <list[2]> <list[1]> 0.04 #> 2: 0.023 <list[2]> <list[1]> 0.08