DSI-QG icon indicating copy to clipboard operation
DSI-QG copied to clipboard

How to calculate the metric HITS

Open oussaidene opened this issue 11 months ago • 1 comments

Hi, I am a bit confused on how the metric HITS is calculated. According to the article, HITS is defined as "the proportion of the correct docids ranked in the top 1 and top 10 predictions." However, it appears that the code implements HITS@N differently.

In the code, HITS@N is calculated as the proportion of queries that retrieve at least one correct document in the top N rankings. Could someone confirm if my understanding is correct?

oussaidene avatar Mar 22 '24 11:03 oussaidene

Hi @oussaidene ,

Refer to Lightning AI, the hit rate is 1.0 if there is at least one relevant document among all the top k retrieved documents. I think the definition of the hit rate should not contain the ranking concept. Hence, the calculation in the code should be correct. Hope this helps!

hi-i-m-GTooth avatar Apr 15 '24 10:04 hi-i-m-GTooth