Formula: L(w) = -sum_i sum_c y_ic log(yhat_ic)
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 10, Sect. 10.7, pp. 400-403. Read from the chapter PDF, not recalled. BOOK DEFECT: the display in Sect. 10.7.2 prints this loss without its leading minus sign, even though the same paragraph calls it the negative log-likelihood of a product of Bernoulli distributions and the Poisson loss two displays later does carry its sign. What is implemented here is the quantity the surrounding text requires – a loss that is minimised – not the sign-dropped display. The book has not been silently corrected elsewhere.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ccelo(V, V)
#> $loss
#> [1] -59.28196
#>
#> $mean_loss
#> [1] -7.410245
#>
#> $n
#> [1] 8
#>
#> $C
#> [1] 1
#>
#> $method
#> [1] "Categorical cross-entropy loss, MVSML Sect. 10.7.2"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
