# 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