Skip to contents

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.

Usage

benchmark_grid_oml(tasks, learners, resamplings)

Arguments

tasks

(list() or Task) A list of mlr3::Tasks.

learners

(list() or Learner) A list of mlr3::Learners.

resamplings

(list() or Resampling) A list of mlr3::Resamplings that are instantiated on the given tasks.

Value

(data.table())

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]>