SLLearner_cfg
is a configuration class for a single
sublearner to be included in SuperLearner. By constructing with a named list
of hyperparameters, this configuration allows distinct submodels
for each unique combination of hyperparameters. To understand what models
and hyperparameters are available, examine the methods listed in
SuperLearner::listWrappers("SL")
.
model_name
The name of the model as passed to SuperLearner
through the SL.library
parameter.
hyperparameters
Named list from hyperparameter name to a vector of values that should be swept over.
new()
Create a new SLLearner_cfg
object with specified model name and hyperparameters.
SLLearner_cfg$new(model_name, hp = NULL)
model_name
The name of the model as passed to SuperLearner
through the SL.library
parameter.
hp
Named list from hyperparameter name to a vector of values that should be swept over. Hyperparameters not included in this list are left at their SuperLearner default values.
SLLearner_cfg$new("SL.glm")
SLLearner_cfg$new("SL.gam", list(deg.gam = c(2, 3)))
## ------------------------------------------------
## Method `SLLearner_cfg$new`
## ------------------------------------------------
SLLearner_cfg$new("SL.glm")
#> <SLLearner_cfg>
#> Public:
#> clone: function (deep = FALSE)
#> hyperparameters: NULL
#> initialize: function (model_name, hp = NULL)
#> model_name: SL.glm
SLLearner_cfg$new("SL.gam", list(deg.gam = c(2, 3)))
#> <SLLearner_cfg>
#> Public:
#> clone: function (deep = FALSE)
#> hyperparameters: list
#> initialize: function (model_name, hp = NULL)
#> model_name: SL.gam