Skip to content

Retrieval evaluator with 0 scores #593

Discussion options

You must be logged in to vote

@sroy-forr this seems like an issue outside the scope of this repo I would suggest creating an issue on pytrec_eval. That being said it seems like you are confusing the corpus ids with the query ids. E.g. in the following I changed out the subset of "a", "b" and "c" to make it more clear:

import pytrec_eval
map_string="map_cut.1,3,5,10,20,100,1000"
ndcg_string="ndcg_cut.1,3,5,10,20,100,1000"
recall_string="recall.1,3,5,10,20,100,1000"
precision_string="P.1,3,5,10,20,100,1000"
qrels = {'a': {'0': 1}, 'b': {'1': 1}, 'c': {'2': 1}}
results = {'a': {'1': 0.730070948600769, '2': 0.730070948600769, "0": 0}, 
           'b': {'0': 0.6978487372398376, '2': 0.7519575357437134, "1": 0}, 
          …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@KennethEnevoldsen
Comment options

Answer selected by sroy-forr
@sroy-forr
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants