From 6f3a3a985f80398bedd758c9fc6845690f069bdf Mon Sep 17 00:00:00 2001 From: Immaterial0 Date: Mon, 16 Oct 2023 03:23:36 -0700 Subject: [PATCH] Should fix auc I think --- src/auc.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/auc.cpp b/src/auc.cpp index f39db6d..e052448 100644 --- a/src/auc.cpp +++ b/src/auc.cpp @@ -109,10 +109,8 @@ List auc( FPR[i] /= n0; FNR[i] /= n1; - if (i == 0) - continue; - - auc += (TPR[i] + TPR[i - 1])*(FPR[i - 1] - FPR[i])/2.0; + if (i == 0) auc += (1+TPR[0])*(1 - FPR[0])/2.0; + else auc += (TPR[i] + TPR[i - 1])*(FPR[i - 1] - FPR[i])/2.0; }