R/caret.train.model.list.R

#' Intended for use with caret; takes a list of items generated by companion function
#' get.caret.model.spec, each of which has one value "method" and one value "tuning"
#' These specify changeable parameters for models
#' It provides a changeable framework so that multiple mthods can all be tested at once
#' There is a list of models here: http://topepo.github.io/caret/modelList.html
#' @param 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)
#' @param y passed directly to train {caret}; a numeric or factor vector containing the outcome for each sample.
#' @param 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.)
#' @param 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.
#' @export
caret.train.model.list <- function(...,trControl,training.list) UseMethod("caret.train.model.list")

caret.train.model.listtestfunc <- function(x)
{
  return(x*2)
}
#runs the actual guts of caret.train.model.list, but hasn't been made accessible
#because function call is probably very counter-intuitive.
#caret.train.model.listParamlist <- function(trainParamList){
#  
#  
#}
bjsmith/r-mvpa documentation built on May 30, 2019, 11:53 a.m.