Description Usage Arguments Details Author(s) Examples
Estimates the Normalized Mean Absolute Error of two univariate signals Y (imputed values) and X (true values).
1 | compute.nmae(Y, X)
|
Y |
vector of imputed values |
X |
vector of true values |
This function returns the value of NMAE of two vectors corresponding to univariate signals. A lower NMAE (NMAE \in [0, \inf]) value indicates a better performance method for the imputation task. Both vectors Y and X must be of equal length, on the contrary an error will be displayed. In both input vectors, eventual NA will be exluded with a warning diplayed.
Camille Dezecache, Hong T. T. Phan, Emilie Poisson-Caillault
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(dataDTWBI)
X <- dataDTWBI[, 1] ; Y <- dataDTWBI[, 2]
compute.nmae(Y,X)
# If true values is a constant vector, NMAE = Inf.
# A warning is displayed and MAE is estimated instead of NMAE,
# unless true and imputed values are equal. In this case,
# by definition, NMAE = 0.
X <- rep(0, 10)
Y <- runif(10)
compute.nmae(Y,X) # MAE computed
Y <- X
compute.nmae(Y,X) # By definition, NMAE = 0
|
[1] 0.1673972
[1] 0.5685687
Warning message:
In compute.nmae(Y, X) :
Vector of true values is constant !!! MAE was computed instead of NMAE !!!
[1] 0
Warning message:
In compute.nmae(Y, X) :
Vectors of true and imputed values are constant and equal !!! By definition NMAE=0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.