MLmetrics icon indicating copy to clipboard operation
MLmetrics copied to clipboard

Integer Overflow in AUC

Open DavZim opened this issue 3 years ago • 1 comments

When I use AUC with more than 100k observations, the AUC calculation has an integer overflow and returns NA, see also this SO question.

For reproducibility:

set.seed(15)
N <- 100000

true <- sample(0:1, N, replace = TRUE)
pred <- sample(0:1, N, replace = TRUE)

MLmetrics::AUC(true, pred)
[1] NA
Warning message:
In n_pos * n_neg : NAs produced by integer overflow

DavZim avatar Mar 30 '21 09:03 DavZim

Is there any solution or workaround for this warning?

ag1805x avatar Mar 22 '23 09:03 ag1805x