Skip to content

Commit

Permalink
Change api usage with cumsum
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan de Bruin <[email protected]>
  • Loading branch information
jteijema and J535D165 authored Oct 31, 2024
1 parent a6527bf commit b4f17c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions asreviewcontrib/insights/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ def _loss_value(labels):
best_auc = Nx * Ny - ((Ny * (Ny - 1)) / 2)

# Compute recall values (y) based on the provided labels.
y = np.array(_recall_values(labels, x_absolute=True, y_absolute=True)[1])

# The actual AUC is the sum of the recall curve.
actual_auc = np.sum(y)
actual_auc = np.cumsum(labels).sum()

# The worst AUC represents the area under the worst-case step curve, which
# is the area under the recall curve where all positive labels are clumped
Expand Down

0 comments on commit b4f17c4

Please sign in to comment.