balancedaccuracy: Starovoitov-Golub Sine-Accuracy Function for Imbalanced...

View source: R/balancedaccuracy.R

balancedaccuracyR Documentation

Starovoitov-Golub Sine-Accuracy Function for Imbalanced Classification Data

Description

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.

Usage

balancedaccuracy(m, print.scores = TRUE)

Arguments

m

the caret confusion matrix object or simple matrix.

print.scores

print the accuracy metrics.

Details

The input object "m" should be a square matrix of at least size 2x2.

Value

a list containing 5 elements: 3 overall and 2 class accuracy scores

Author(s)

Alexandru Monahov, <https://www.alexandrumonahov.eu.org/>

See Also

[wconfusionmatrix()]

Examples

m = matrix(c(70,0,0,10,10,0,5,3,2), ncol = 3, nrow=3)
balancedaccuracy(m, print.scores = TRUE)


wconf documentation built on Sept. 11, 2024, 6:22 p.m.