View source: R/ML_StackedModel.R
StackedModel | R Documentation |
Fit a stacked regression model from multiple base learners.
StackedModel(
...,
control = MachineShop::settings("control"),
weights = numeric()
)
... |
model functions, function names, objects; other objects that can be coerced to models; or vector of these to serve as base learners. |
control |
control function, function name, or object defining the resampling method to be employed for the estimation of base learner weights. |
weights |
optional fixed base learner weights. |
factor
, numeric
, ordered
,
Surv
StackedModel
class object that inherits from MLModel
.
Breiman, L. (1996). Stacked regression. Machine Learning, 24, 49-64.
fit
, resample
## Requires prior installation of suggested packages gbm and glmnet to run
model <- StackedModel(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.