Skip to content

Commit

Permalink
Merge pull request #21 from Immaterial0/patch-1
Browse files Browse the repository at this point in the history
Should fix auc I think
  • Loading branch information
gvegayon authored Oct 17, 2023
2 parents cae6c88 + 6f3a3a9 commit 8f0205d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/auc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

Expand Down

0 comments on commit 8f0205d

Please sign in to comment.