capreolus.eval.msmarco_eval
¶
This module computes evaluation metrics for MSMARCO dataset on the ranking task.
Creation Date : 06/12/2018 Last Modified : 1/21/2019 Authors : Daniel Campos <dacamp@microsoft.com>, Rutger van Haasteren <ruvanh@microsoft.com>
Module Contents¶
Functions¶
|
|
|
|
|
Perform quality checks on the dictionaries |
|
Compute MRR metric |
|
|
|
Command line: |
Attributes¶
- capreolus.eval.msmarco_eval.quality_checks_qids(qids_to_relevant_passageids, qids_to_ranked_candidate_passages)[source]¶
Perform quality checks on the dictionaries
Args: p_qids_to_relevant_passageids (dict): dictionary of query-passage mapping
Dict as read in with load_reference or load_reference_from_stream
p_qids_to_ranked_candidate_passages (dict): dictionary of query-passage candidates :returns: Boolean whether allowed, message to be shown in case of a problem :rtype: bool,str
- capreolus.eval.msmarco_eval.compute_metrics(qids_to_relevant_passageids, qids_to_ranked_candidate_passages)[source]¶
Compute MRR metric Args: p_qids_to_relevant_passageids (dict): dictionary of query-passage mapping
Dict as read in with load_reference or load_reference_from_stream
p_qids_to_ranked_candidate_passages (dict): dictionary of query-passage candidates :returns: dictionary of metrics {‘MRR’: <MRR Score>} :rtype: dict