caretStack {caretEnsemble} | R Documentation |
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, ...)
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
Value
S3 caretStack object
References
https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.60.2859&rep=rep1&type=pdf
Examples
## Not run:
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")
## End(Not run)
[Package caretEnsemble version 2.0.3 Index]