R/getTrainPerf.R

getTrainPerf <- function(x)
{
  bestPerf <- x$bestTune
  colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf))
  out <- merge(x$results, bestPerf)
  out <- out[, colnames(out) %in% x$perfNames]

  colnames(out) <- paste("Train", colnames(out), sep = "")
  out$method <- x$method
  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.