R/predictionFunction.R

predictionFunction <- function(method, modelFit, newdata, preProc = NULL, param = NULL)
{
  if(!is.null(preProc)) newdata <- predict(preProc, newdata)
  out <- method$predict(modelFit = modelFit, 
                        newdata = newdata, 
                        submodels = param)
  ## TODO convert to character with classification
  out 
}

Try the caret package in your browser

Any scripts or data that you put into this service are public.

caret documentation built on May 2, 2019, 5:47 p.m.