RMSE function

Root Mean Squared Error

Root Mean Squared Error

The root of the Mean Squared Error between the exact value and the predicted one.

RMSE(Y, Ypred)

Arguments

  • Y: a real vector with the values of the output
  • Ypred: a real vector with the predicted values

Returns

a real which represents the root of the mean squared error between the target response YY

and the fitted one YpredYpred:

\codeRMSE=1ni=1n(Y(xi)Y^(xi))2.RMSE=sqrt(mean((YYpred)2)). \code{RMSE} = \sqrt{\frac{1}{n} \sum_{i=1}^{n} \left( Y \left( x_{i}\right)-\hat{Y}\left( x_{i}\right)\right)^2}.RMSE = sqrt(mean((Y-Ypred)^2)).

Author(s)

D. Dupuy

See Also

other validation criteria as MAE or RMA

Examples

X <- seq(-1,1,0.1) Y <- 3*X + rnorm(length(X),0,0.5) Ypred <- 3*X print(RMSE(Y,Ypred))
  • Maintainer: C. Helbert
  • License: GPL-3
  • Last published: 2023-12-04

Useful links