-
Notifications
You must be signed in to change notification settings - Fork 149
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
Filter positive items for ranking evaluation #523
Filter positive items for ranking evaluation #523
Conversation
Hi @amirj, we're making some changes to how the ranking metrics being computed, and these changes will break the logic of PropensityStratifiedEvaluation. Could you please have a look and see if we could mitigate this with some modification to the eval method? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tqtg, I left two comments please have a look. The rest looks good to me.
6c5f332
to
3a1f0ce
Compare
Description
Previously, we did not filter positive items in training when doing evaluation on test/validation set for most of the ranking metrics. As a result, it harms performance of some models that indeed rank those items to the top. In this PR, we first explicitly filter out those items when calling
Recommender.rank()
function usingitem_indices
, we then modify all ranking metrics to obey this logic. To summarize, positive items in training will not be involved during evaluation.How are the ranking metrics affected?
AUC
: not affected - previous logic already took it into account.Precision
: affected - expected the results to be increased.Recall
: affected - expected the results to be increased.NDCG
: affected - expected the results to be increased.NCRR
: affected - expected the results to be increased.MAP
: affected - expected the results to be increased.MRR
: affected - expected the results to be increased.How are the rating metrics affected?
No. This change only affects ranking metrics.
Related Issues
#503
Checklist:
README.md
(if you are adding a new model).examples/README.md
(if you are adding a new example).datasets/README.md
(if you are adding a new dataset).