Learn R Programming

MachineShop (version 2.0.0)

StackedModel: Stacked Regression Model

Description

Fit a stacked regression model from multiple base learners.

Usage

StackedModel(..., control = MachineShop::settings("control"), weights = NULL)

Arguments

...

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

control

control function, function name, or call defining the resampling method to be employed for the estimation of base learner weights.

weights

optional fixed base learner weights.

Value

StackedModel class object that inherits from MLModel.

Details

Response Types:

factor, numeric, ordered, Surv

References

Breiman, L. (1996) Stacked Regression. Machine Learning, 24, 49--64.

See Also

fit, resample

Examples

Run this code
# NOT RUN {
model <- StackedModel(GBMModel, SVMRadialModel, GLMNetModel(lambda = 0.01))
model_fit <- fit(sale_amount ~ ., data = ICHomes, model = model)
predict(model_fit, newdata = ICHomes)

# }

Run the code above in your browser using DataLab