Description Usage Arguments Examples
Can take x and y values as the defaults.
| 1 2 | ## Default S3 method:
caret.train.model.list(x, y, trControl, training.list, ...)
 | 
| x | passed directly to train caret; an object where samples are in rows and features are in columns. This could be a simple matrix, data frame or other type (e.g. sparse matrix) | 
| y | passed directly to train caret; a numeric or factor vector containing the outcome for each sample. | 
| trControl | passed directly to train caret; a list of values that define how this function acts. Default value if each item doesn't have its own trControl. See trainControl and http://topepo.github.io/caret/training.html#custom. (NOTE: If given, this argument must be named.) | 
| training.list; | a list describing a list of train caret values to run. Should be a list of objects generated by get.caret.model.spec. Each should contain exactly two values, to be passed to train caret: method and tuning. If tuning is an integer, it will be passed to tuneLength. If tuning is a data frame, it will be passed to tuneGrid. If it is null, train's default values for tuneLength will apply. Otherwise an error is generated. | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | obs <- 500
x.vars <-100
y.vals <- sample(c(1,2),obs,replace = TRUE)
x.vals <- as.data.frame(matrix(rnorm(obs*x.vars,0,1),nrow=obs,ncol=x.vars))
x.vals <- apply(x.vals, 2, function(x.col){return(x.col+y.vals)})
trControl <- trainControl(method="repeatedcv", number=10, repeats=3)
  caret.train.model.list(x.vals
  ,y.vals
  ,trControl
  ,list(
   get.caret.model.spec("svmLinear")
   ,get.caret.model.spec("knn")
 )
 )
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.