Skip to content

get.max_acc fails to calculate correct accuracy on edge case #14

@mmauri

Description

@mmauri

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions