trainControl
From caret v3.32
by Max Kuhn
Control parameters for train
Control of printing and resampling for train
- Keywords
- utilities
Usage
trainControl(
method = "boot",
number = ifelse(method == "cv", 10, 25),
verboseIter = TRUE,
returnData = TRUE,
p = 0.5,
selectionFunction = "best",
index = NULL)
Arguments
- method
- The resampling method:
boot
,cv
,LOOCV
,LGOCV
(for repeated training/test splits), oroob
(only for random forest, bagged trees, bagged earth, bagged flexible discriminant analysis, - number
- Either the number of folds or number of resampling iterations
- verboseIter
- A logical for printing a training log.
- returnData
- A logical for saving the data
- p
- For leave-group out cross-validation: the training percentage
- selectionFunction
- the function used to select the optimal tuning parameter. This can be a name of the function or the funciton itself. See
best
for details and other options. - index
- a list with elements for each resampling iteration. Each list element is the sample rows used for training at that iteration.
Value
- An echo of the parameters specified
Community examples
RAVINDARMADISHETTY@GMAIL.COM
at
Jul 23, 2018
caret
v6.0-80
I am getting below error while submitting a text x = trainControl(method = "repeatedcv", number = numbers, repeats = repeats, classProbs = TRUE, summaryFunction = twoClassSummary) Error: Please suggesrt Error in trainControl(method = "repeatedcv", number = numbers, repeats = repeats, : could not find function "trainControl"