MLmetrics
MLmetrics copied to clipboard
Integer Overflow in AUC
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
Is there any solution or workaround for this warning?