# NOT RUN {
rr = tune_nested(
method = "random_search",
task = tsk("pima"),
learner = lrn("classif.rpart", cp = to_tune(1e-04, 1e-1, logscale = TRUE)),
inner_resampling = rsmp ("holdout"),
outer_resampling = rsmp("cv", folds = 2),
measure = msr("classif.ce"),
term_evals = 2,
batch_size = 2)
# retrieve inner tuning results.
extract_inner_tuning_results(rr)
# performance scores estimated on the outer resampling
rr$score()
# unbiased performance of the final model trained on the full data set
rr$aggregate()
# }
Run the code above in your browser using DataLab