cvangysel / pytrec_eval

pytrec_eval is an Information Retrieval evaluation tool for Python, based on the popular trec_eval.
http://ilps.science.uva.nl/
MIT License
282 stars 32 forks source link

Adding judged_only and allowing negative relevance_level #29

Open seanmacavaney opened 3 years ago

seanmacavaney commented 3 years ago

The -J flag in trec_eval allows discards unjudged documents when computing relevance scores. While it's normally not advised to use this, it is sometimes handy. Tests included.

Also, there used to be an error that was thrown when relevance_level was less than 1. There's nothing in trec_eval that imposes this limitation, so I removed the check and added tests to make sure it works correctly. (Needed to change the data type to long to match that of epi.) Again, usually not an issue, but sometimes handy.