| as.BenchmarkAggr {mlr3benchmark} | R Documentation | 
Coercions to BenchmarkAggr
Description
This function is deprecated, use as_benchmark_aggr() instead.
Coercion methods to BenchmarkAggr. For mlr3::BenchmarkResult this is a simple
wrapper around the BenchmarkAggr constructor called with mlr3::BenchmarkResult$aggregate().
Usage
as.BenchmarkAggr(
  obj,
  task_id = "task_id",
  learner_id = "learner_id",
  independent = TRUE,
  strip_prefix = TRUE,
  ...
)
Arguments
obj | 
 (mlr3::BenchmarkResult|  | 
task_id, learner_id, independent, strip_prefix | 
 See BenchmarkAggr  | 
... | 
 
  | 
Examples
df = data.frame(tasks = factor(rep(c("A", "B"), each = 5),
                               levels = c("A", "B")),
                learners = factor(paste0("L", 1:5)),
                RMSE = runif(10), MAE = runif(10))
as_benchmark_aggr(df, task_id = "tasks", learner_id = "learners")
if (requireNamespaces(c("mlr3", "rpart"))) {
  library(mlr3)
  task = tsks(c("boston_housing", "mtcars"))
  learns = lrns(c("regr.featureless", "regr.rpart"))
  bm = benchmark(benchmark_grid(task, learns, rsmp("cv", folds = 2)))
  # default measure
  as_benchmark_aggr(bm)
  # change measure
  as_benchmark_aggr(bm, measures = msr("regr.rmse"))
}
[Package mlr3benchmark version 0.1.6 Index]