This function allows to construct a SurrogateLearner in the spirit
of mlr_sugar
from mlr3.
Arguments
- learner
(mlr3::LearnerRegr)
mlr3::LearnerRegr that is to be used.- archive
(
NULL
| bbotk::Archive)
bbotk::Archive of the bbotk::OptimInstance used. Can also beNULL
.- x_cols
(
NULL
|character()
)
Names of columns in the bbotk::Archive that should be used as features. Can also beNULL
.- y_col
(
NULL
|character(1)
)
Name of the column in the bbotk::Archive that should be used as a target. Can also beNULL
.- ...
(named
list()
)
Named arguments passed to the constructor, to be set as parameters in the paradox::ParamSet.
Examples
srlrn(lrn("regr.featureless"), catch_errors = FALSE)
#> <SurrogateLearner>: LearnerRegrFeatureless
#> * Parameters: assert_insample_perf=FALSE, catch_errors=FALSE