-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
LambdarankNDCG objective ignores truncation level #3420
Comments
@metpavel during training, some top docs may be wrong ranking, and not in top-k. In these cases, we still need to consider all docs. |
@guolinke, in fact, we would still consider all documents even if we exclude pairs containing both documents beyond the top-k (as any document will contribute when paired with any other top-k document -- thus any relevant document has a push towards the top of the list no matter what position it is at). Otherwise, we just optimize for NDCG@Full_Rank regardless of the desired truncation level. |
actually, the parameter once named For your solution, |
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
In /src/objective/rank_objective.hpp: currently, for each query, all pairs of documents contribute to the gradients computation regardless of the truncation level k. However, to correctly optimize for NDCG@k, one should exclude pairs containing both documents beyond the top k (as they don't affect NDCG@k when swapped). Please enforce the check for the truncation level k.
The text was updated successfully, but these errors were encountered: