Skip to contents

Formula: MSE = (1/T) sum_i (y_i - yhat_i)^2

Usage

Msetst(y, yhat)

Arguments

y

Numeric vector.

yhat

Predicted values, same length as y.

Value

List with mse, rmse, 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)
Msetst(V, V)
#> $mse
#> [1] 0
#> 
#> $rmse
#> [1] 0
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Test-set mean squared error, MVSML Eq. (4.1)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"