Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate the metric HITS #14

Open
oussaidene opened this issue Mar 22, 2024 · 1 comment
Open

How to calculate the metric HITS #14

oussaidene opened this issue Mar 22, 2024 · 1 comment

Comments

@oussaidene
Copy link

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?

@hi-i-m-GTooth
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants