R/getTrainPerf.R

Defines functions getTrainPerf

Documented in getTrainPerf

#' @export
getTrainPerf <- function(x) {
  bestPerf <- x$bestTune
  colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf))
  out <- merge(x$results, bestPerf)
  out <- out[, colnames(out) %in% x$perfNames, drop = FALSE]
  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 March 31, 2023, 9:49 p.m.