OMLTasks contain tasks as well as resamplings. In order to create a benchmark design from a list of tasks and corresponding instantiated resamplings, this function can be used.
Arguments
- tasks
(
list()
orTask
) A list of mlr3::Tasks.- learners
(
list()
orLearner
) A list of mlr3::Learners.- resamplings
(
list()
orResampling
) A list of mlr3::Resamplings that are instantiated on the given tasks.
Examples
try({
library("mlr3")
collection = OMLCollection$new(258)
otasks = collection$tasks[1:2, ][["task"]]
tasks = as_tasks(otasks)
resamplings = as_resamplings(otasks)
learners = lrns(c("classif.rpart", "classif.featureless"))
design = benchmark_grid_oml(tasks, learners, resamplings)
print(design)
bmr = benchmark(design)
}, silent = TRUE)
#> task learner resampling
#> 1: <TaskClassif[50]> <LearnerClassifRpart[38]> <ResamplingCustom[20]>
#> 2: <TaskClassif[50]> <LearnerClassifFeatureless[38]> <ResamplingCustom[20]>
#> 3: <TaskClassif[50]> <LearnerClassifRpart[38]> <ResamplingCustom[20]>
#> 4: <TaskClassif[50]> <LearnerClassifFeatureless[38]> <ResamplingCustom[20]>