Control parameters for train

Control the computational nuances of the train function

trainControl(method = "boot", 
             number = ifelse(method %in% c("cv", "repeatedcv"), 10, 25),
             repeats = ifelse(method %in% c("cv", "repeatedcv"), 1, number),
             verboseIter = FALSE, 
             returnData = TRUE, 
             returnResamp = "final",
             p = 0.75, 
             classProbs = FALSE,
             summaryFunction = defaultSummary,
             selectionFunction = "best",
             custom = NULL,
             preProcOptions = list(thresh = 0.95, ICAcomp = 3, k = 5),
             index = NULL,
             timingSamps = 0,
             predictionBounds = rep(FALSE, 2))

For custom modeling functions, several functions can be specified using the custom argument:

  • parameters
{a data frame or function of tuning parameters} model{a function that trains the model} prediction{a function that predicts new samples (either numbers or character/factor vectors)} probability{an optional function for classification models that returns a matrix or data frame of class probabilities (in columns)} sort{a function that sorts the tuning parameters by complexity}


  • An echo of the parameters specified

Documentation reproduced from package caret, version 5.07-001, License: GPL-2

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"