Laurae icon indicating copy to clipboard operation
Laurae copied to clipboard

get.max_acc fails to calculate correct accuracy on edge case

Open mmauri opened this issue 5 years ago • 0 comments

Hi Laurae, Congrats with this superb library. With few observations xgboost some times returns the same probability to each one, and having the same probability with different labels makes get.max_acc report the inverse of accuracy & the max threshold also is incorrect if we assume that positive obs are > threshold (not >=)

To reproduce it: get.max_acc(rep(0.502,8),c(0,1,1,1,1,1,1,1))

It gives 0.125 accuracy with 0.502 threshold

Thanks for your time

mmauri avatar Apr 23 '19 15:04 mmauri