Description Usage Arguments Value Examples
Set shared settings for all model (and training) configurations within a model grid. These settings will apply for any given model, unless the same settings have already been specified in the model specific configurations. In that case, the model specific settings will apply.
1 |
model_grid |
|
... |
All optional shared settings. |
model_grid
equipped with shared settings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(magrittr)
library(caret)
library(dplyr)
data(GermanCredit)
# Pre-allocate empty model grid.
models <- model_grid()
# Set shared settings of model grid.
models %>%
share_settings(
y = GermanCredit[["Class"]],
x = GermanCredit %>% select(-Class),
metric = "ROC",
preProc = c("center", "scale", "pca"),
trControl = trainControl(
method = "cv",
number = 5,
summaryFunction = twoClassSummary,
classProbs = TRUE
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.