View source: R/ML_SuperModel.R
SuperModel | R Documentation |
Fit a super learner model to predictions from multiple base learners.
SuperModel(
...,
model = GBMModel,
control = MachineShop::settings("control"),
all_vars = FALSE
)
... |
model functions, function names, objects; other objects that can be coerced to models; or vector of these to serve as base learners. |
model |
model function, function name, or object defining the super model; or another object that can be coerced to the model. |
control |
control function, function name, or object defining the resampling method to be employed for the estimation of base learner weights. |
all_vars |
logical indicating whether to include the original predictor variables in the super model. |
factor
, numeric
, ordered
,
Surv
SuperModel
class object that inherits from MLModel
.
van der Laan, M. J., Polley, E. C., & Hubbard, A. E. (2007). Super learner. Statistical Applications in Genetics and Molecular Biology, 6(1).
fit
, resample
## Requires prior installation of suggested packages gbm and glmnet to run
model <- SuperModel(GBMModel, SVMRadialModel, GLMNetModel(lambda = 0.01))
model_fit <- fit(sale_amount ~ ., data = ICHomes, model = model)
predict(model_fit, newdata = ICHomes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.