I run the code below. If I deactivate instantiation (as shown), the results of my benchmark comparison will be different for the three benchmark experiments and the conclusion which learner performs better may be different.
How can I adress this issue? One way may be to average over a large number of resamplings. I could write code for this but maybe this is an option already when calling "benchmark"?
resampling = rsmp("cv", folds=20)
#resampling$instantiate(task) # results below will (and shall) differ, if instantiation is not performed here
design = benchmark_grid(
tasks = task,
learners = list(glrn_knn_pca, glrn_knn_nopca),
resamplings = resampling
)
design2 = benchmark_grid(
tasks = task,
learners = list(glrn_knn_pca, glrn_knn_nopca),
resamplings = resampling
)
design3 = benchmark_grid(
tasks = task,
learners = list(glrn_knn_pca, glrn_knn_nopca),
resamplings = resampling
)
bmr = benchmark(design)
bmr2 = benchmark(design2)
bmr3 = benchmark(design3)
bmr$aggregate(msr("classif.auc"))
bmr2$aggregate(msr("classif.auc"))
bmr3$aggregate(msr("classif.auc"))