R/RMSE.R

Defines functions RMSE

Documented in RMSE

#' Calculate Root Mean Square Error 'RMSE' between vectors
#'
#'The function is used to calculate the root mean square error between two vectors
#'
#' @usage RMSE(Actual, Predicted)
#'
#' @param Actual Vector of actual data
#'
#' @param Predicted vector of predicted data
#'
#' @return The root mean square error between the two input vectors
#'
#' @examples RMSE(c(1,2,3), c(10,20,30))
#'
#' @export
#'
#' @author Mohamed Soudy \email{Mohmedsoudy2009@gmail.com}
RMSE <- function(Actual, Predicted)
{
  return(sqrt(mean((Actual - Predicted)^2)))
}

Try the MERO package in your browser

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

MERO documentation built on March 7, 2023, 5:40 p.m.