Learn R Programming

caretEnsemble (version 4.0.1)

c.caretList: S3 definition for concatenating caretList

Description

take N objects of class caretList and concatenate them into a larger object of class caretList for future ensembling

Usage

# S3 method for caretList
c(...)

Value

a caretList object

Arguments

...

the objects of class caretList or train to bind into a caretList

Examples

Run this code
data(iris)
model_list1 <- caretList(Sepal.Width ~ .,
  data = iris,
  tuneList = list(
    lm = caretModelSpec(method = "lm")
  )
)

model_list2 <- caretList(Sepal.Width ~ .,
  data = iris, tuneLength = 1L,
  tuneList = list(
    rf = caretModelSpec(method = "rf")
  )
)

bigList <- c(model_list1, model_list2)

Run the code above in your browser using DataLab