Learn R Programming

caretEnsemble (version 4.0.1)

c.train: S3 definition for concatenating train objects

Description

take N objects of class train and concatenate into an object of class caretList for future ensembling

Usage

# S3 method for train
c(...)

Value

a caretList object

Arguments

...

the objects of class train to bind into a caretList

Examples

Run this code
data(iris)
model_lm <- caret::train(Sepal.Length ~ .,
  data = iris,
  method = "lm"
)

model_rf <- caret::train(Sepal.Length ~ .,
  data = iris,
  method = "rf",
  tuneLength = 1L
)

model_list <- c(model_lm, model_rf)

Run the code above in your browser using DataLab