powered by
Compute a robust version of the F-Beta Score with two additional parameters.
robFScore2( actual = NULL, predicted = NULL, TP = NULL, FN = NULL, FP = NULL, TN = NULL, d1 = 1, d0 = 0.1, c = 1 )
robust F-Beta Score with two additional parameters.
A vector of actual values (1/0 or TRUE/FALSE)
A vector of prediction values (1/0 or TRUE/FALSE)
Count of true positives (correctly predicted 1/TRUE)
Count of false negatives (predicted 0/FALSE, but actually 1/TRUE)
Count of false positives (predicted 1/TRUE, but actually 0/FALSE)
Count of true negatives (correctly predicted 0/FALSE)
Weight of recall in the harmonic mean (corresponds to beta squared)
Weight of the estimated true positive probability in the harmonic mean
Additional parameter in numerator
Calculate the robust F-Beta Score \(F_{rb}\) with two additional parameters. Provide either:
actual and predicted or
actual
predicted
TP, FN, FP and TN.
TP
FN
FP
TN
If \(d_1=\beta^2, d_0=c=0\), the robust F-Beta Score coincides with the F-Beta Score.
Holzmann, H., Klar, B. (2024). Robust performance metrics for imbalanced classification problems. arXiv:2404.07661. LINK
actual <- c(1,1,1,1,1,1,0,0,0,0) predicted <- c(1,1,1,1,0,0,1,0,0,0) robFScore2(actual, predicted, d0 = 0.1, c = 0.1) robFScore2(TP=4, FN=2, FP=1, TN=3, d0 = 0.1, c = 1)
Run the code above in your browser using DataLab