Skip to content

Commit

Permalink
Return formula instead of deriving in code.
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 ceaf9b3 commit ebdfd83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asreviewcontrib/insights/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ebdfd83

Please sign in to comment.