From 129bc6604cc641ff37813f786a16a9013cae8b21 Mon Sep 17 00:00:00 2001 From: be-marc Date: Tue, 25 Nov 2025 14:32:16 +0100 Subject: [PATCH 1/5] release: 1.3.0 --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1fc26b417..05d913fff 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: mlr3 Title: Machine Learning in R - Next Generation -Version: 1.2.0.9000 +Version: 1.3.0 Authors@R: c( person("Michel", "Lang", , "michellang@gmail.com", role = "aut", diff --git a/NEWS.md b/NEWS.md index 267bda519..fe123ed0b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# mlr3 (development version) +# mlr3 1.3.0 * feat: `Learner$predict()` can now add additional data to `PredictionClassif` and `PredictionRegr` objects via the `extra` field. From 00649dc0528efb7b6ed849d0b37dd98b17bdfdbb Mon Sep 17 00:00:00 2001 From: be-marc Date: Tue, 25 Nov 2025 14:37:35 +0100 Subject: [PATCH 2/5] ... --- NEWS.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NEWS.md b/NEWS.md index fe123ed0b..63d779463 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,16 @@ # mlr3 1.3.0 * feat: `Learner$predict()` can now add additional data to `PredictionClassif` and `PredictionRegr` objects via the `extra` field. +* feat: `Mlr3Error` and `Mlr3Warning` classes for errors and warnings. +* refactor: `$obs_loss` methods in `Measure`, `Prediction`, `ResampleResult`, and `BenchmarkResult`. +* perf: Use more `lengths()` and `data.table::setattr()` in tests. +* perf: Use `attr()` instead of `attributes()` for extracting single attributes. +* test: Use more specialised test functions. +* fix: `weights_measure` now work with `stratum`. +* fix: Encapsulation loads loaded packages on the workers. +* fix: Learners can handle new factor levels. +* refactor: Use more implicit returns. +* feat: Learner can pass extra data to predictions. # mlr3 1.2.0 From ab5b073483a931cd3fdc2d1231449126f445fdc0 Mon Sep 17 00:00:00 2001 From: be-marc Date: Tue, 25 Nov 2025 14:49:23 +0100 Subject: [PATCH 3/5] ... --- R/mlr_tasks.R | 2 +- R/zzz.R | 2 +- man-roxygen/seealso_task.R | 2 +- man/Task.Rd | 2 +- man/TaskClassif.Rd | 2 +- man/TaskRegr.Rd | 2 +- man/TaskSupervised.Rd | 2 +- man/TaskUnsupervised.Rd | 2 +- man/california_housing.Rd | 2 +- man/mlr3-package.Rd | 2 +- man/mlr_tasks.Rd | 2 +- man/mlr_tasks_breast_cancer.Rd | 2 +- man/mlr_tasks_german_credit.Rd | 2 +- man/mlr_tasks_iris.Rd | 2 +- man/mlr_tasks_mtcars.Rd | 2 +- man/mlr_tasks_penguins.Rd | 2 +- man/mlr_tasks_pima.Rd | 2 +- man/mlr_tasks_sonar.Rd | 2 +- man/mlr_tasks_spam.Rd | 2 +- man/mlr_tasks_wine.Rd | 2 +- man/mlr_tasks_zoo.Rd | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/R/mlr_tasks.R b/R/mlr_tasks.R index ab6144d90..67ced79a8 100644 --- a/R/mlr_tasks.R +++ b/R/mlr_tasks.R @@ -8,7 +8,7 @@ #' #' This dictionary can get populated with additional tasks by add-on packages, #' e.g. \CRANpkg{mlr3data}, \CRANpkg{mlr3proba} or \CRANpkg{mlr3cluster}. -#' \CRANpkg{mlr3oml} allows to interact with [OpenML](https://www.openml.org). +#' \CRANpkg{mlr3oml} allows to interact with [OpenML](https://openml.org). #' #' For a more convenient way to retrieve and construct tasks, see [tsk()]/[tsks()]. #' diff --git a/R/zzz.R b/R/zzz.R index d953bec40..c7d861737 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -23,7 +23,7 @@ #' * Preprocessing and machine learning pipelines: \CRANpkg{mlr3pipelines} #' * Analysis of benchmark experiments: \CRANpkg{mlr3benchmark} #' * More classification and regression tasks: \CRANpkg{mlr3data} -#' * Connector to [OpenML](https://www.openml.org): \CRANpkg{mlr3oml} +#' * Connector to [OpenML](https://openml.org): \CRANpkg{mlr3oml} #' * Solid selection of good classification and regression learners: \CRANpkg{mlr3learners} #' * Even more learners: \url{https://github.com/mlr-org/mlr3extralearners} #' * Tuning of hyperparameters: \CRANpkg{mlr3tuning} diff --git a/man-roxygen/seealso_task.R b/man-roxygen/seealso_task.R index 2564776f0..9a83f533d 100644 --- a/man-roxygen/seealso_task.R +++ b/man-roxygen/seealso_task.R @@ -3,7 +3,7 @@ #' * Chapter in the [mlr3book](https://mlr3book.mlr-org.com/): #' \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} #' * Package \CRANpkg{mlr3data} for more toy tasks. -#' * Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +#' * Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. #' * Package \CRANpkg{mlr3viz} for some generic visualizations. #' * [Dictionary][mlr3misc::Dictionary] of [Tasks][Task]: [mlr_tasks] #' * `as.data.table(mlr_tasks)` for a table of available [Tasks][Task] in the running session (depending on the loaded packages). diff --git a/man/Task.Rd b/man/Task.Rd index 6a2eee4c2..849adc2a5 100644 --- a/man/Task.Rd +++ b/man/Task.Rd @@ -199,7 +199,7 @@ task$backend$nrow \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskClassif.Rd b/man/TaskClassif.Rd index 4aba71d86..1483c85e5 100644 --- a/man/TaskClassif.Rd +++ b/man/TaskClassif.Rd @@ -33,7 +33,7 @@ task$data(rows = 1:3, cols = task$feature_names[1:2]) \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskRegr.Rd b/man/TaskRegr.Rd index 8c38eb6ef..84967956e 100644 --- a/man/TaskRegr.Rd +++ b/man/TaskRegr.Rd @@ -23,7 +23,7 @@ task$data(rows = 1:3, cols = task$feature_names[1:2]) \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskSupervised.Rd b/man/TaskSupervised.Rd index 27bcdec90..5dca8f08b 100644 --- a/man/TaskSupervised.Rd +++ b/man/TaskSupervised.Rd @@ -18,7 +18,7 @@ TaskSupervised$new("penguins", task_type = "classif", backend = palmerpenguins:: \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskUnsupervised.Rd b/man/TaskUnsupervised.Rd index 52796f664..dd352d99c 100644 --- a/man/TaskUnsupervised.Rd +++ b/man/TaskUnsupervised.Rd @@ -14,7 +14,7 @@ TaskUnsupervised$new("penguins", task_type = "regr", backend = palmerpenguins::p \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/california_housing.Rd b/man/california_housing.Rd index 47ede640c..f98e188b5 100644 --- a/man/california_housing.Rd +++ b/man/california_housing.Rd @@ -41,7 +41,7 @@ tsk("california_housing") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr3-package.Rd b/man/mlr3-package.Rd index b70090d57..fd80b48d2 100644 --- a/man/mlr3-package.Rd +++ b/man/mlr3-package.Rd @@ -25,7 +25,7 @@ Efficient, object-oriented programming on the building blocks of machine learnin \item Preprocessing and machine learning pipelines: \CRANpkg{mlr3pipelines} \item Analysis of benchmark experiments: \CRANpkg{mlr3benchmark} \item More classification and regression tasks: \CRANpkg{mlr3data} -\item Connector to \href{https://www.openml.org}{OpenML}: \CRANpkg{mlr3oml} +\item Connector to \href{https://openml.org}{OpenML}: \CRANpkg{mlr3oml} \item Solid selection of good classification and regression learners: \CRANpkg{mlr3learners} \item Even more learners: \url{https://github.com/mlr-org/mlr3extralearners} \item Tuning of hyperparameters: \CRANpkg{mlr3tuning} diff --git a/man/mlr_tasks.Rd b/man/mlr_tasks.Rd index 7a8bf67a1..ad2d697fb 100644 --- a/man/mlr_tasks.Rd +++ b/man/mlr_tasks.Rd @@ -13,7 +13,7 @@ Each task has an associated help page, see \code{mlr_tasks_[id]}. This dictionary can get populated with additional tasks by add-on packages, e.g. \CRANpkg{mlr3data}, \CRANpkg{mlr3proba} or \CRANpkg{mlr3cluster}. -\CRANpkg{mlr3oml} allows to interact with \href{https://www.openml.org}{OpenML}. +\CRANpkg{mlr3oml} allows to interact with \href{https://openml.org}{OpenML}. For a more convenient way to retrieve and construct tasks, see \code{\link[=tsk]{tsk()}}/\code{\link[=tsks]{tsks()}}. } diff --git a/man/mlr_tasks_breast_cancer.Rd b/man/mlr_tasks_breast_cancer.Rd index 7d59aee62..997285f36 100644 --- a/man/mlr_tasks_breast_cancer.Rd +++ b/man/mlr_tasks_breast_cancer.Rd @@ -42,7 +42,7 @@ tsk("breast_cancer") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_german_credit.Rd b/man/mlr_tasks_german_credit.Rd index 2ec936773..ebaca8942 100644 --- a/man/mlr_tasks_german_credit.Rd +++ b/man/mlr_tasks_german_credit.Rd @@ -65,7 +65,7 @@ Reports in Mathematics, Physics and Chemistry 4, Department II, Beuth University \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_iris.Rd b/man/mlr_tasks_iris.Rd index ca33553a5..9139708a4 100644 --- a/man/mlr_tasks_iris.Rd +++ b/man/mlr_tasks_iris.Rd @@ -43,7 +43,7 @@ tsk("iris") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_mtcars.Rd b/man/mlr_tasks_mtcars.Rd index 167a9d0f8..e2ba66038 100644 --- a/man/mlr_tasks_mtcars.Rd +++ b/man/mlr_tasks_mtcars.Rd @@ -36,7 +36,7 @@ tsk("mtcars") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_penguins.Rd b/man/mlr_tasks_penguins.Rd index 7645a9da0..4f652e5e2 100644 --- a/man/mlr_tasks_penguins.Rd +++ b/man/mlr_tasks_penguins.Rd @@ -55,7 +55,7 @@ Gorman KB, Williams TD, Fraser WR (2014). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_pima.Rd b/man/mlr_tasks_pima.Rd index 83e1d1e87..2e8173a70 100644 --- a/man/mlr_tasks_pima.Rd +++ b/man/mlr_tasks_pima.Rd @@ -36,7 +36,7 @@ tsk("pima") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_sonar.Rd b/man/mlr_tasks_sonar.Rd index 8d5041ee2..71903414c 100644 --- a/man/mlr_tasks_sonar.Rd +++ b/man/mlr_tasks_sonar.Rd @@ -36,7 +36,7 @@ tsk("sonar") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_spam.Rd b/man/mlr_tasks_spam.Rd index cd2eba4c3..c4fe42444 100644 --- a/man/mlr_tasks_spam.Rd +++ b/man/mlr_tasks_spam.Rd @@ -54,7 +54,7 @@ Dua, Dheeru, Graff, Casey (2017). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_wine.Rd b/man/mlr_tasks_wine.Rd index 22de08209..93b255d6c 100644 --- a/man/mlr_tasks_wine.Rd +++ b/man/mlr_tasks_wine.Rd @@ -49,7 +49,7 @@ Dua, Dheeru, Graff, Casey (2017). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_zoo.Rd b/man/mlr_tasks_zoo.Rd index b020faeaa..bbe41069c 100644 --- a/man/mlr_tasks_zoo.Rd +++ b/man/mlr_tasks_zoo.Rd @@ -36,7 +36,7 @@ tsk("zoo") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). From 02a82afc2953d09572b390daa3161937cfdb9b88 Mon Sep 17 00:00:00 2001 From: be-marc Date: Mon, 1 Dec 2025 12:55:07 +0100 Subject: [PATCH 4/5] ... --- R/mlr_tasks.R | 2 +- R/zzz.R | 2 +- man-roxygen/seealso_task.R | 2 +- man/Task.Rd | 2 +- man/TaskClassif.Rd | 2 +- man/TaskRegr.Rd | 2 +- man/TaskSupervised.Rd | 2 +- man/TaskUnsupervised.Rd | 2 +- man/california_housing.Rd | 2 +- man/mlr3-package.Rd | 2 +- man/mlr_tasks.Rd | 2 +- man/mlr_tasks_breast_cancer.Rd | 2 +- man/mlr_tasks_german_credit.Rd | 2 +- man/mlr_tasks_iris.Rd | 2 +- man/mlr_tasks_mtcars.Rd | 2 +- man/mlr_tasks_penguins.Rd | 2 +- man/mlr_tasks_pima.Rd | 2 +- man/mlr_tasks_sonar.Rd | 2 +- man/mlr_tasks_spam.Rd | 2 +- man/mlr_tasks_wine.Rd | 2 +- man/mlr_tasks_zoo.Rd | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/R/mlr_tasks.R b/R/mlr_tasks.R index 67ced79a8..ab6144d90 100644 --- a/R/mlr_tasks.R +++ b/R/mlr_tasks.R @@ -8,7 +8,7 @@ #' #' This dictionary can get populated with additional tasks by add-on packages, #' e.g. \CRANpkg{mlr3data}, \CRANpkg{mlr3proba} or \CRANpkg{mlr3cluster}. -#' \CRANpkg{mlr3oml} allows to interact with [OpenML](https://openml.org). +#' \CRANpkg{mlr3oml} allows to interact with [OpenML](https://www.openml.org). #' #' For a more convenient way to retrieve and construct tasks, see [tsk()]/[tsks()]. #' diff --git a/R/zzz.R b/R/zzz.R index c7d861737..d953bec40 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -23,7 +23,7 @@ #' * Preprocessing and machine learning pipelines: \CRANpkg{mlr3pipelines} #' * Analysis of benchmark experiments: \CRANpkg{mlr3benchmark} #' * More classification and regression tasks: \CRANpkg{mlr3data} -#' * Connector to [OpenML](https://openml.org): \CRANpkg{mlr3oml} +#' * Connector to [OpenML](https://www.openml.org): \CRANpkg{mlr3oml} #' * Solid selection of good classification and regression learners: \CRANpkg{mlr3learners} #' * Even more learners: \url{https://github.com/mlr-org/mlr3extralearners} #' * Tuning of hyperparameters: \CRANpkg{mlr3tuning} diff --git a/man-roxygen/seealso_task.R b/man-roxygen/seealso_task.R index 9a83f533d..2564776f0 100644 --- a/man-roxygen/seealso_task.R +++ b/man-roxygen/seealso_task.R @@ -3,7 +3,7 @@ #' * Chapter in the [mlr3book](https://mlr3book.mlr-org.com/): #' \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} #' * Package \CRANpkg{mlr3data} for more toy tasks. -#' * Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +#' * Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. #' * Package \CRANpkg{mlr3viz} for some generic visualizations. #' * [Dictionary][mlr3misc::Dictionary] of [Tasks][Task]: [mlr_tasks] #' * `as.data.table(mlr_tasks)` for a table of available [Tasks][Task] in the running session (depending on the loaded packages). diff --git a/man/Task.Rd b/man/Task.Rd index 849adc2a5..6a2eee4c2 100644 --- a/man/Task.Rd +++ b/man/Task.Rd @@ -199,7 +199,7 @@ task$backend$nrow \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskClassif.Rd b/man/TaskClassif.Rd index 1483c85e5..4aba71d86 100644 --- a/man/TaskClassif.Rd +++ b/man/TaskClassif.Rd @@ -33,7 +33,7 @@ task$data(rows = 1:3, cols = task$feature_names[1:2]) \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskRegr.Rd b/man/TaskRegr.Rd index 84967956e..8c38eb6ef 100644 --- a/man/TaskRegr.Rd +++ b/man/TaskRegr.Rd @@ -23,7 +23,7 @@ task$data(rows = 1:3, cols = task$feature_names[1:2]) \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskSupervised.Rd b/man/TaskSupervised.Rd index 5dca8f08b..27bcdec90 100644 --- a/man/TaskSupervised.Rd +++ b/man/TaskSupervised.Rd @@ -18,7 +18,7 @@ TaskSupervised$new("penguins", task_type = "classif", backend = palmerpenguins:: \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/TaskUnsupervised.Rd b/man/TaskUnsupervised.Rd index dd352d99c..52796f664 100644 --- a/man/TaskUnsupervised.Rd +++ b/man/TaskUnsupervised.Rd @@ -14,7 +14,7 @@ TaskUnsupervised$new("penguins", task_type = "regr", backend = palmerpenguins::p \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/california_housing.Rd b/man/california_housing.Rd index f98e188b5..47ede640c 100644 --- a/man/california_housing.Rd +++ b/man/california_housing.Rd @@ -41,7 +41,7 @@ tsk("california_housing") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr3-package.Rd b/man/mlr3-package.Rd index fd80b48d2..b70090d57 100644 --- a/man/mlr3-package.Rd +++ b/man/mlr3-package.Rd @@ -25,7 +25,7 @@ Efficient, object-oriented programming on the building blocks of machine learnin \item Preprocessing and machine learning pipelines: \CRANpkg{mlr3pipelines} \item Analysis of benchmark experiments: \CRANpkg{mlr3benchmark} \item More classification and regression tasks: \CRANpkg{mlr3data} -\item Connector to \href{https://openml.org}{OpenML}: \CRANpkg{mlr3oml} +\item Connector to \href{https://www.openml.org}{OpenML}: \CRANpkg{mlr3oml} \item Solid selection of good classification and regression learners: \CRANpkg{mlr3learners} \item Even more learners: \url{https://github.com/mlr-org/mlr3extralearners} \item Tuning of hyperparameters: \CRANpkg{mlr3tuning} diff --git a/man/mlr_tasks.Rd b/man/mlr_tasks.Rd index ad2d697fb..7a8bf67a1 100644 --- a/man/mlr_tasks.Rd +++ b/man/mlr_tasks.Rd @@ -13,7 +13,7 @@ Each task has an associated help page, see \code{mlr_tasks_[id]}. This dictionary can get populated with additional tasks by add-on packages, e.g. \CRANpkg{mlr3data}, \CRANpkg{mlr3proba} or \CRANpkg{mlr3cluster}. -\CRANpkg{mlr3oml} allows to interact with \href{https://openml.org}{OpenML}. +\CRANpkg{mlr3oml} allows to interact with \href{https://www.openml.org}{OpenML}. For a more convenient way to retrieve and construct tasks, see \code{\link[=tsk]{tsk()}}/\code{\link[=tsks]{tsks()}}. } diff --git a/man/mlr_tasks_breast_cancer.Rd b/man/mlr_tasks_breast_cancer.Rd index 997285f36..7d59aee62 100644 --- a/man/mlr_tasks_breast_cancer.Rd +++ b/man/mlr_tasks_breast_cancer.Rd @@ -42,7 +42,7 @@ tsk("breast_cancer") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_german_credit.Rd b/man/mlr_tasks_german_credit.Rd index ebaca8942..2ec936773 100644 --- a/man/mlr_tasks_german_credit.Rd +++ b/man/mlr_tasks_german_credit.Rd @@ -65,7 +65,7 @@ Reports in Mathematics, Physics and Chemistry 4, Department II, Beuth University \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_iris.Rd b/man/mlr_tasks_iris.Rd index 9139708a4..ca33553a5 100644 --- a/man/mlr_tasks_iris.Rd +++ b/man/mlr_tasks_iris.Rd @@ -43,7 +43,7 @@ tsk("iris") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_mtcars.Rd b/man/mlr_tasks_mtcars.Rd index e2ba66038..167a9d0f8 100644 --- a/man/mlr_tasks_mtcars.Rd +++ b/man/mlr_tasks_mtcars.Rd @@ -36,7 +36,7 @@ tsk("mtcars") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_penguins.Rd b/man/mlr_tasks_penguins.Rd index 4f652e5e2..7645a9da0 100644 --- a/man/mlr_tasks_penguins.Rd +++ b/man/mlr_tasks_penguins.Rd @@ -55,7 +55,7 @@ Gorman KB, Williams TD, Fraser WR (2014). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_pima.Rd b/man/mlr_tasks_pima.Rd index 2e8173a70..83e1d1e87 100644 --- a/man/mlr_tasks_pima.Rd +++ b/man/mlr_tasks_pima.Rd @@ -36,7 +36,7 @@ tsk("pima") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_sonar.Rd b/man/mlr_tasks_sonar.Rd index 71903414c..8d5041ee2 100644 --- a/man/mlr_tasks_sonar.Rd +++ b/man/mlr_tasks_sonar.Rd @@ -36,7 +36,7 @@ tsk("sonar") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_spam.Rd b/man/mlr_tasks_spam.Rd index c4fe42444..cd2eba4c3 100644 --- a/man/mlr_tasks_spam.Rd +++ b/man/mlr_tasks_spam.Rd @@ -54,7 +54,7 @@ Dua, Dheeru, Graff, Casey (2017). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_wine.Rd b/man/mlr_tasks_wine.Rd index 93b255d6c..22de08209 100644 --- a/man/mlr_tasks_wine.Rd +++ b/man/mlr_tasks_wine.Rd @@ -49,7 +49,7 @@ Dua, Dheeru, Graff, Casey (2017). \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). diff --git a/man/mlr_tasks_zoo.Rd b/man/mlr_tasks_zoo.Rd index bbe41069c..b020faeaa 100644 --- a/man/mlr_tasks_zoo.Rd +++ b/man/mlr_tasks_zoo.Rd @@ -36,7 +36,7 @@ tsk("zoo") \item Chapter in the \href{https://mlr3book.mlr-org.com/}{mlr3book}: \url{https://mlr3book.mlr-org.com/chapters/chapter2/data_and_basic_modeling.html} \item Package \CRANpkg{mlr3data} for more toy tasks. -\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://openml.org}. +\item Package \CRANpkg{mlr3oml} for downloading tasks from \url{https://www.openml.org}. \item Package \CRANpkg{mlr3viz} for some generic visualizations. \item \link[mlr3misc:Dictionary]{Dictionary} of \link[=Task]{Tasks}: \link{mlr_tasks} \item \code{as.data.table(mlr_tasks)} for a table of available \link[=Task]{Tasks} in the running session (depending on the loaded packages). From 280fb34ea3702bf76c2ceb74642ffa021e26ebc8 Mon Sep 17 00:00:00 2001 From: be-marc Date: Tue, 2 Dec 2025 17:07:54 +0100 Subject: [PATCH 5/5] primary iters --- tests/testthat/test_Measure.R | 39 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/tests/testthat/test_Measure.R b/tests/testthat/test_Measure.R index c98afd626..21a54f3a3 100644 --- a/tests/testthat/test_Measure.R +++ b/tests/testthat/test_Measure.R @@ -275,38 +275,29 @@ test_that("measure weights", { }) - - - test_that("primary iters are respected", { task = tsk("sonar") - resampling = rsmp("cv")$instantiate(task) - train_sets = map(1:10, function(i) resampling$train_set(i)) - test_sets = map(1:10, function(i) resampling$train_set(i)) - r1 = rsmp("custom")$instantiate(task, train_sets = train_sets, test_sets = test_sets) - get_private(r1, ".primary_iters") = 1:2 - r2 = rsmp("custom")$instantiate(task, train_sets = train_sets[1:2], test_sets = test_sets[1:2]) - r3 = rsmp("custom")$instantiate(task, train_sets = train_sets, test_sets = test_sets) - learner = lrn("classif.rpart", predict_type = "prob") + resampling = rsmp("cv", folds = 10) + resampling$instantiate(task) + get_private(resampling, ".primary_iters") = 1:2 - rr1 = resample(task, learner, r1, store_models = TRUE) - rr2 = resample(task, learner, r2, store_models = TRUE) - rr3 = resample(task, learner, r3, store_models = TRUE) - + rr = resample(task, learner, resampling) m = msr("classif.acc") m$average = "macro" - expect_equal(rr1$aggregate(), rr2$aggregate()) - m$average = "micro" - expect_equal(rr1$aggregate(), rr2$aggregate()) + scores = rr$score(m)$classif.acc + + # macro aggregation + expect_equal(unname(rr$aggregate(m)), mean(scores[1:2])) + expect_true(unname(rr$aggregate(m)) != mean(scores)) + + # micro aggregation + pred_micro = do.call(c, rr$predictions()[1:2]) + scores = pred_micro$score(m) + expect_equal(unname(m$score(pred_micro)), unname(scores)) jaccard = msr("sim.jaccard") - expect_error(rr1$aggregate(jaccard), "primary_iters") - expect_no_error(rr2$aggregate(jaccard)) - jaccard$properties = c(jaccard$properties, "primary_iters") - x1 = rr1$aggregate(jaccard) - x2 = rr3$aggregate(jaccard) - expect_equal(x1, x2) + expect_error(rr$aggregate(jaccard), "primary_iters") }) test_that("no predict_sets required (#1094)", {