Learn R Programming

caretEnsemble (version 2.0.3)

caretStack: Combine several predictive models via stacking

Description

Find a good linear combination of several classification or regression models, using either linear regression, elastic net regression, or greedy optimization.

Usage

caretStack(all.models, ...)

Value

S3 caretStack object

Arguments

all.models

a list of caret models to ensemble.

...

additional arguments to pass to the optimization function

Details

Check the models, and make a matrix of obs and preds

References

https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.60.2859&rep=rep1&type=pdf

Examples

Run this code
if (FALSE) {
library("rpart")
models <- caretList(
  x=iris[1:50,1:2],
  y=iris[1:50,3],
  trControl=trainControl(method="cv"),
  methodList=c("rpart", "glm")
)
caretStack(models, method="glm")
}

Run the code above in your browser using DataLab