Skip to contents

Formula: BS = T^-1 sum_i sum_c (pi_ic - d_ic)^2 (eq. 4.14) with d_ic the indicator of the observed category. The categorical score lies in [0, 2]; halving puts it in [0, 1]. Lower is better.

Usage

Msm009(probs, y_true, n_classes = NULL, halved = FALSE)

Arguments

probs

Matrix of predicted class probabilities, one row per case.

y_true

Observed class labels, zero-based.

n_classes

Number of classes; inferred when NULL.

halved

If TRUE return BS/2.

Value

List with estimate, brier, mean_log_loss, method.

References

Montesinos Lopez, Montesinos Lopez & Crossa (2022), Multivariate Statistical Machine Learning Methods for Genomic Prediction, Springer, eq. (4.14) p.136. DOI 10.1007/978-3-030-89010-0.

Examples

Msm009(probs = c(1, 2, 3, 4, 5, 6, 7, 8), y_true = 5L)
#> $estimate
#> [1] 193
#> 
#> $brier
#> [1] 193
#> 
#> $mean_log_loss
#> [1] -1.791759
#> 
#> $method
#> [1] "Brier score (MVSML 2022 eq. 4.14)"
#>