Learn R Programming

mlr3tuning (version 0.7.0)

extract_inner_tuning_results: Extract Inner Tuning Results

Description

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.

Usage

extract_inner_tuning_results(x)

Arguments

Value

data.table::data.table().

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab