We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As identified by @grodino in terrierteam/ir_measures#42
In short, when a measure with multiple cutoffs are provided to RelevanceEvaluator, only one is returned on subsequent invocations.
RelevanceEvaluator
>>> import pytrec_eval >>> qrel = { >>> '0': {'D0': 0, 'D1': 1, 'D2': 1, 'D3': 1, 'D4': 0}, >>> '1': {'D0': 1, 'D3': 2, 'D5': 2} >>> } >>> run = { >>> '0': {'D0': 0.8, 'D2': 0.7, 'D1': 0.3, 'D3': 0.4, 'D4': 0.1}, >>> '1': {'D1': 0.8, 'D3': 0.7, 'D4': 0.3, 'D2': 0.4, 'D10': 8.} >>> } >>> evaluator = pytrec_eval.RelevanceEvaluator(qrel, {'map', 'ndcg_cut.10,100,2'}) >>> print(evaluator.evaluate(run)) {'0': {'map': 0.6388888888888888, 'ndcg_cut_2': 0.38685280723454163, 'ndcg_cut_10': 0.7328286204777911, 'ndcg_cut_100': 0.7328286204777911}, '1': {'map': 0.1111111111111111, 'ndcg_cut_2': 0.0, 'ndcg_cut_10': 0.26582598262939583, 'ndcg_cut_100': 0.26582598262939583}} >>> print(evaluator.evaluate(run)) {'0': {'map': 0.6388888888888888, 'ndcg_cut_10': 0.7328286204777911}, '1': {'map': 0.1111111111111111, 'ndcg_cut_10': 0.26582598262939583}} # ^ second invocation is missing ndcg_cut_2, ndcg_cut_100
The text was updated successfully, but these errors were encountered:
fix for cvangysel#38
7ec2ea3
No branches or pull requests
As identified by @grodino in terrierteam/ir_measures#42
In short, when a measure with multiple cutoffs are provided to
RelevanceEvaluator
, only one is returned on subsequent invocations.The text was updated successfully, but these errors were encountered: