Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SuperModel

Super Learner Model


Description

Fit a super learner model to predictions from multiple base learners.

Usage

SuperModel(
  ...,
  model = GBMModel,
  control = MachineShop::settings("control"),
  all_vars = FALSE
)

Arguments

...

model functions, function names, calls, or vector of these to serve as base learners.

model

model function, function name, or call defining the super model.

control

control function, function name, or call 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.

Details

Response Types:

factor, numeric, ordered, Surv

Value

SuperModel class object that inherits from MLModel.

References

van der Lann, M.J., Hubbard A.E. (2007) Super Learner. Statistical Applications in Genetics and Molecular Biology, 6(1).

See Also

Examples

## 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)

MachineShop

Machine Learning Models and Tools

v2.8.0
GPL-3
Authors
Brian J Smith [aut, cre]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.