| SLEnsemble_cfg | R Documentation |
SLEnsemble_cfg is a configuration class for estimation of a model
using an ensemble of models using SuperLearner.
tidyhte::Model_cfg -> SLEnsemble_cfg
cvControlA list of parameters for controlling the cross-validation used in SuperLearner.
SL.libraryA vector of the names of learners to include in the SuperLearner ensemble.
SL.envAn environment containing all of the programmatically generated learners to be included in the SuperLearner ensemble.
familystats::family object to determine how SuperLearner
should be fitted.
model_classThe class of the model, required for all classes
which inherit from Model_cfg.
new()Create a new SLEnsemble_cfg object with specified settings.
SLEnsemble_cfg$new( cvControl = NULL, learner_cfgs = NULL, family = stats::gaussian() )
cvControlA list of parameters for controlling the
cross-validation used in SuperLearner.
For more details, see SuperLearner::SuperLearner.CV.control.
learner_cfgsA list of SLLearner_cfg objects.
familystats::family object to determine how SuperLearner should be fitted.
A new SLEnsemble_cfg object.
SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
add_sublearner()Adds a model (or class of models) to the SuperLearner ensemble. If hyperparameter values are specified, this method will add a learner for every element in the cross-product of provided hyperparameter values.
SLEnsemble_cfg$add_sublearner(learner_name, hps = NULL)
learner_namePossible values
use SuperLearner naming conventions. A full list is available
with SuperLearner::listWrappers("SL")
hpsA named list of hyper-parameters. Every element of the cross-product of these hyper-parameters will be included in the ensemble. cfg <- SLEnsemble_cfg$new( learner_cfgs = list(SLLearner_cfg$new("SL.glm")) ) cfg <- cfg$add_sublearner("SL.gam", list(deg.gam = c(2, 3)))
clone()The objects of this class are cloneable with this method.
SLEnsemble_cfg$clone(deep = FALSE)
deepWhether to make a deep clone.
SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
## ------------------------------------------------
## Method `SLEnsemble_cfg$new`
## ------------------------------------------------
SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.