caretList | R Documentation |
Build a list of train objects suitable for ensembling using the caretStack
function.
caretList(
...,
trControl = NULL,
methodList = NULL,
tuneList = NULL,
metric = NULL,
continue_on_fail = FALSE,
trim = TRUE
)
... |
arguments to pass to |
trControl |
a |
methodList |
optional, a character vector of caret models to ensemble. One of methodList or tuneList must be specified. |
tuneList |
optional, a NAMED list of caretModelSpec objects. This much more flexible than methodList and allows the specification of model-specific parameters (e.g. passing trace=FALSE to nnet) |
metric |
a string, the metric to optimize for. If NULL, we will choose a good one. |
continue_on_fail |
logical, should a valid caretList be returned that excludes models that fail, default is FALSE |
trim |
logical should the train models be trimmed to save memory and speed up stacking |
A list of train
objects. If the model fails to build,
it is dropped from the list.
caretList(
Sepal.Length ~ Sepal.Width,
head(iris, 50),
methodList = c("glm", "lm"),
tuneList = list(
nnet = caretModelSpec(method = "nnet", trace = FALSE, tuneLength = 1)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.