Skip to contents

This function allows to construct a SurrogateLearnerCollection in the spirit of mlr_sugar from mlr3.

Usage

srlrnc(learners, archive = NULL, x_cols = NULL, y_cols = NULL, ...)

Arguments

learners

(List of mlr3::LearnerRegr)
mlr3::LearnerRegr that are to be used.

archive

(NULL | bbotk::Archive)
bbotk::Archive of the bbotk::OptimInstance used. Can also be NULL.

x_cols

(NULL | character())
Names of columns in the bbotk::Archive that should be used as features. Can also be NULL.

y_cols

(NULL | character())
Names of the columns in the bbotk::Archive that should be used as targets. Can also be NULL.

...

(named list())
Named arguments passed to the constructor, to be set as parameters in the paradox::ParamSet.

Examples

srlrnc(list(lrn("regr.featureless"), lrn("regr.featureless")), catch_errors = FALSE)
#> <SurrogateLearnerCollection>: (LearnerRegrFeatureless | LearnerRegrFeatureless)
#> * Parameters: assert_insample_perf=FALSE, catch_errors=FALSE