caret (version 5.07-001)

trainControl: Control parameters for train

Description

Control the computational nuances of the train function

Usage

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))

Arguments

Value

  • An echo of the parameters specified

Details

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}