Open cmacdonald opened 3 years ago
The following nicknames might be handy:
For a pytrec_eval (nick)name -> irm mapping function, would something like this meet your needs?
ir_measures.convert_trec_name(name: str) -> List[BaseMeasure]
# Examples
ir_measures.convert_trec_name('map') -> [AP]
ir_measures.convert_trec_name('P_5') -> [P@5]
ir_measures.convert_trec_name('P_5,10') -> [P@5, P@10]
ir_measures.convert_trec_name('P.5') -> [P@5]
ir_measures.convert_trec_name('P.5,10') -> [P@5, P@10]
ir_measures.convert_trec_name('P') -> [P@5, P@10, P@15, P@20, P@30, P@100, P@200, P@500, P@1000] # expando
ir_measures.convert_trec_name('ndcg') -> [nDCG]
ir_measures.convert_trec_name('ndcg_cut') -> [nDCG@5, nDCG@10, ...] # expando
ir_measures.convert_trec_name('official') -> [NumRet, ...] # all those from the family
Also:
ir_measures.convert_trec_name('ndcg_cut_5') -> [nDCG@5]
Your implementation might come from: https://github.com/terrier-org/pyterrier/blob/ir_measures/pyterrier/pipelines.py#L64
Remaining measures (identified via supported_measures in pytrec_eval):
This list is not exhaustive, but just the other measures more likely to be used.