R/error.R

Defines functions MSE MAE

# mean squared error

# regarding prediction on a testset
MSE <- function(x, y){
  mse <- mean((x - y)^2)
  return(mse)
}


# mean absolute error
MAE <- function(x, y){
  mae <- mean(abs(x-y))
  return(mae)

}
yymmhaha/PackPaper1 documentation built on May 24, 2019, 8:55 a.m.