caretStack: Combine several predictive models via stacking

Description Usage Arguments Details Value References Examples

View source: R/caretStack.R

Description

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

Usage

1
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

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

zachmayer/caretEnsemble documentation built on Nov. 7, 2017, 5:01 a.m.