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

[ASK] Question on ndcg_at_k calculation #1962

Open
Lulu20220 opened this issue Jul 24, 2023 · 0 comments
Open

[ASK] Question on ndcg_at_k calculation #1962

Lulu20220 opened this issue Jul 24, 2023 · 0 comments
Labels
help wanted Need help from developers

Comments

@Lulu20220
Copy link

Lulu20220 commented Jul 24, 2023

Description

Why are we using rank ('first) to get the order of the ideal ranking instead of rank('min') or rank('average)?

https://github.com/microsoft/recommenders/blob/main/recommenders/evaluation/python_evaluation.py#L687
line 597
df_idcg["irank"] = df_idcg.groupby(col_user, as_index=False, sort=False)[
col_rating
].rank("first", ascending=False)

In this case, if there is a tied in the rating, for example, item A, B, C, D, rating is 1, 0, 0,0. Using rank('first), irank = 1,2,3,4. But should we take the tied condition into consideration, that means the irank = 1,2,2,2?

Other Comments

@Lulu20220 Lulu20220 added the help wanted Need help from developers label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need help from developers
Projects
None yet
Development

No branches or pull requests

1 participant