LambdaRank implementation in lambdaloss.py
Closed this issue · 6 comments
The implementation seems correct to me. I think you are missing a sigmoid
in your definition of scores_diffs
in the image you shared.
@dmh43 Thanks for the reply. The sigmoid is the σ sign in front of the scores_diffs
.
The correct implementation is the first equation in LambdaRank
, but the equation in Lambdaloss.py
is not equivalent to the LambdaRank
, correct?
Oh I see, I think there's some confusion on the notation. In the Burges paper that defines lambdarank, log(1+e^-x) = log sigmoid(x)
)).
Yes, we tried to keep close to the original paper. Unfortunately, sometimes it may lead to confusing notation. The sigma parameter is the exponent of the logistic function, just as @dmh43 wrote.
Thank you, it is very encouraging to see not only a new issue but also a solution coming from someone other than the original contributors.
@mohuzi If you have any further questions regarding the LambdaLoss implementation, please feel free to ask. If not, you can close this issue.
All good now. Thanks for the clarification.
@sadaharu-inugami You all did an incredible job with this codebase. Thanks so much for sharing it. Also the work on contextual ranking powered by this repo was also insightful to read.