View source: R/balancedaccuracy.R
balancedaccuracy | R Documentation |
This function calculates classification accuracy scores using the sine-based formulas proposed by Starovoitov and Golub (2020). The advantage of the new method consists in producing improved results when compared with the standard balanced accuracy function, by taking into account the class distribution of errors.
balancedaccuracy(m, print.scores = TRUE)
m |
the caret confusion matrix object or simple matrix. |
print.scores |
print the accuracy metrics. |
The input object "m" should be a square matrix of at least size 2x2.
a list containing 5 elements: 3 overall and 2 class accuracy scores
Alexandru Monahov, <https://www.alexandrumonahov.eu.org/>
[wconfusionmatrix()]
m = matrix(c(70,0,0,10,10,0,5,3,2), ncol = 3, nrow=3)
balancedaccuracy(m, print.scores = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.