Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AUCPR work with multiple query groups #4436

Merged
merged 2 commits into from
May 3, 2019
Merged

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented May 3, 2019

Fixes #4431.

I read the paper referenced by the AUCPR implementation, and as far as I can tell, the EvalAucPR seems to be consistent with the paper.

The issue was that EvalAucPR was assuming the existence of only a single query group. More precisely, it throws an exception when sum_auc >= 1.0, where it should have checked sum_auc >= ngroup instead. Since all tests for AUCPR was performing binary classification (where there is only one group), the bug went undetected.

Fix. Have a proper check on the AUC value, in presence of multiple query groups. Also add a test with learning-to-rank example.

@hcho3
Copy link
Collaborator Author

hcho3 commented May 3, 2019

I'm merging this, since it involves the change of a single assertion and doesn't change the actual implementation of AUCPR.

@hcho3 hcho3 merged commit 9252b68 into dmlc:master May 3, 2019
@hcho3 hcho3 deleted the fix_aucpr branch May 3, 2019 17:34
@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AUCPR metric fails for learning-to-rank
1 participant