MAE function

Mean Absolute Error

Mean Absolute Error

The mean of absolute errors between real values and predictions.

MAE(Y, Ypred)

Arguments

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

Returns

a real which represents the mean of the absolute errors between the real and the predicted values:

MAE=1ni=1nY(xi)Y^(xi)MAE=1/n[Y(x1)Ypred(x1)+...+Y(xn)Ypred(xn)] MAE = \frac{1}{n} \sum_{i=1}^{n} | Y \left( x_{i}\right)-\hat{Y} \left( x_{i}\right)|MAE = 1/n * [|Y(x1)-Ypred(x1)|+...+|Y(xn)-Ypred(xn)|]

where xixi denotes the points of the experimental design, YY the output of the computer code and YpredYpred the fitted model.

Author(s)

D. Dupuy

See Also

other quality criteia as RMSE and RMA.

Examples

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

Useful links