lts {mlr3tuningspaces} | R Documentation |
Syntactic Sugar for Tuning Space Construction
Description
Function to retrieve TuningSpace objects from mlr_tuning_spaces and further, allows a mlr3::Learner to be directly configured with a search space. This function belongs to mlr3::mlr_sugar family.
Usage
lts(x, ...)
## S3 method for class 'missing'
lts(x, ...)
## S3 method for class 'character'
lts(x, ...)
## S3 method for class 'Learner'
lts(x, ...)
ltss(x)
Arguments
x |
( |
... |
(named list of paradox::TuneToken | |
Value
TuningSpace if x
is character()
.
mlr3::Learner if x
is mlr3::Learner.
Or a list of objects for the ltss()
function.
missing, mlr_tuning_spaces dictionary
a character
, TuningSpace
a mlr3::Learner, mlr3::Learner with paradox::TuneToken
a list()
, list of TuningSpace or mlr3::Learner
Examples
# load tuning space
lts("classif.rpart.default")
# load tuning space and add parameter
lts("classif.rpart.default", maxdepth = to_tune(1, 15))
# load tuning space and remove parameter
lts("classif.rpart.default", minsplit = NULL)
# load tuning space and overwrite parameter
lts("classif.rpart.default", minsplit = to_tune(32, 128))
# load learner and apply tuning space in one go
lts(lrn("classif.rpart"))
# load learner, overwrite parameter and apply tuning space
lts(lrn("classif.rpart"), minsplit = to_tune(32, 128))
# load multiple tuning spaces
ltss(c("classif.rpart.default", "classif.ranger.default"))