From ebdfd8360213aaa4db6ca3d75b45b9474be12ece Mon Sep 17 00:00:00 2001 From: Jelle Teijema Date: Thu, 31 Oct 2024 10:06:42 +0100 Subject: [PATCH] Return formula instead of deriving in code. Co-authored-by: Jonathan de Bruin --- asreviewcontrib/insights/algorithms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asreviewcontrib/insights/algorithms.py b/asreviewcontrib/insights/algorithms.py index 9a3256f..e67ebf4 100644 --- a/asreviewcontrib/insights/algorithms.py +++ b/asreviewcontrib/insights/algorithms.py @@ -43,7 +43,7 @@ def _loss_value(labels): # AUC, normalized by the range between the best and worst AUCs. normalized_loss = (best_auc - actual_auc) / (Ny * (Nx - Ny)) - return normalized_loss + return (Ny * (Nx - (Ny - 1) / 2) - np.cumsum(labels).sum()) / (Ny * (Nx - Ny)) def _wss_values(labels, x_absolute=False, y_absolute=False):