If you retrieve more documents (high recall), youâll likely retrieve more junk (low precision). If youâre very selective (high precision), youâll miss a lot of good documents (low recall).
Ranked Results:
Average Precision: We calculate precision every time a relevant document is found, and then average all of those scores.
E.g:Â You have 3 relevant docs. Your system ranks them at positions 1, 3, and 7.
Precision at rank 1: 11â=1.0
Precision at rank 3: 32â=0.66
Precision at rank 7: 73â=0.42
AP=31.0+0.66+0.42â=0.69
Relevant documents ranked early are heavily rewarded.
Normalised Discounted Cumulative Gain (NDCG):Â This is the most popular measure for web search.
Use Case: Used when relevance isnât just âyes/noâ but graded (e.g., 3=Perfect, 2=Good, 1=Fair).
How it works:
Gain (G):Â The graded relevance score (e.g., 3, 2, 1).
Cumulative Gain (CG):Â Sum the gains as you go down the list.
Discounted CG (DCG): The gain of docs lower in the rank is âdiscountedâ (reduced) using a logfunction, because users are less likely to see them.
Normalised DCG (NDCG): The DCG score is divided by the ideal DCG (the score of a perfect ranking) to get a value between 0.0 and 1.0.