Open MhmdSaiid opened 1 year ago
Following this
I tried something similar, I was actually doing below steps:
Trained Lambdarank for NDCG metric Performed model predict on test data I reranked the results and apply standard ndcg formula to check the score for test data but results were different
If there is any code available to doapply custom metrics post model predict.
Ps. I know model.eva() is available but I want to check through my custom metrics as well
Hello, I am trying to implement the LambdaRank objective in python so that I could later change the metric NDCG to one that I want. I started by implementing it with NDCG, so that I can compare with the built-in implementation. Unfortunately, the NDCG@1 metric is not changing every iteration. Could someone please have a look? FYI, I have used the equations for the gradients and hessians in the paper.
Here is the custom objective function: (The positions and qids are input as I need them to compute NDCG).
This is how I am calling it:
ndcg_at_1()
is an implementation of NDCG@1. It gives similar results to the built-in method.Thanks in advance.