R/getRMSE.R

Defines functions getRMSE

Documented in getRMSE

#' @title getRMSE
#' @description calculates the root of mean square error (RMSE) in the test set of calibrated predictions
#' @param actual vector of observed class labels (0/1)
#' @param predicted vector of uncalibrated predictions
#' @return RMSE value
#' @rdname getRMSE


getRMSE <- function(actual, predicted){
  res <- (((actual-predicted)%*%(actual-predicted)/length(actual))^0.5)
  return(as.numeric(res))
}

Try the CalibratR package in your browser

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

CalibratR documentation built on Aug. 19, 2019, 5:04 p.m.