SLLearner_cfg | R Documentation |
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.
A new SLLearner_cfg
object.
SLLearner_cfg$new("SL.glm") SLLearner_cfg$new("SL.gam", list(deg.gam = c(2, 3)))
clone()
The objects of this class are cloneable with this method.
SLLearner_cfg$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `SLLearner_cfg$new`
## ------------------------------------------------
SLLearner_cfg$new("SL.glm")
SLLearner_cfg$new("SL.gam", list(deg.gam = c(2, 3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.