Skip to content

Commit

Permalink
Should fix auc I think
Browse files Browse the repository at this point in the history
  • Loading branch information
Immaterial0 authored Oct 16, 2023
1 parent cae6c88 commit 6f3a3a9
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 6f3a3a9

Please sign in to comment.