geek-ai/irgan

ltr-gan-pointwise里的ndcg_at_k

Closed this issue · 3 comments

fword commented

这个ndcg算的有问题把,没有考虑2,1这种关系啊

I implemented NDCG@k based on Wiki (https://en.wikipedia.org/wiki/Discounted_cumulative_gain#Normalized_DCG).
Also, We only have labels (0 or 1), not ranks (1 or 2).

fword commented

cat test.txt |awk '{print $1}'|sort|uniq
0
1
-1
2
why u says "We only have labels (0 or 1),"