Skip to contents

Formula: MAE = (1/T) sum_i |y_i - yhat_i|

Usage

Maetst(y, yhat)

Arguments

y

Numeric vector.

yhat

Predicted values, same length as y.

Value

List with mae, n.

References

Montesinos Lopez, Montesinos Lopez and Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, doi:10.1007/978-3-030-89010-0. Chapter 4, Sect. 4.5.1, Eq. (4.1) p. 129 (MSE), Eq. (4.2) p. 129 (Pearson accuracy) and Eq. (4.3) p. 131 (MAE). Read from the chapter PDF, not recalled.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Maetst(V, V)
#> $mae
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Test-set mean absolute error, MVSML Eq. (4.3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"