meerqat.ir.fuse module#

usage: fuse.py [-h] [–config CONFIG] [–print_config [={comments,skip_null,skip_default}+]] [–qrels QRELS] [–runs RUNS] [–norm NORM] [–method METHOD] [–output OUTPUT] [–defmin DEFMIN]

{fit,test} …

options:
-h, --help

Show this help message and exit.

--config CONFIG

Path to a configuration file.

–print_config [={comments,skip_null,skip_default}+]

Print the configuration after applying all other arguments and exit.

Optimize fusion using ranx:
–qrels QRELS, –qrels+ QRELS

(type: Union[str, List[str], null], default: null)

–runs RUNS, –runs+ RUNS

(type: Optional[List[str]], default: null)

–norm NORM, –norm+ NORM

(type: Union[str, null, List[Optional[str]]], default: zmuv)

–method METHOD, –method+ METHOD

(type: Union[str, null, List[Optional[str]]], default: wsum)

--output OUTPUT

(type: Optional[str], default: null)

–defmin DEFMIN, –defmin+ DEFMIN

(type: Union[bool, null, List[Optional[bool]]], default: False)

subcommands:

For more details of each subcommand add it as argument followed by –help.

{fit,test}

fit Finds best parameters test Applies best parameters

meerqat.ir.fuse.create_empty_results_dict()[source]#
meerqat.ir.fuse.create_empty_results_dict_list(length)[source]#
meerqat.ir.fuse.convert_results_dict_list_to_run(q_ids, results_dict_list)[source]#
meerqat.ir.fuse.extract_scores(results)[source]#

Extract the scores from a given results dictionary.

meerqat.ir.fuse.gzmuv_norm(run)[source]#

Apply gzmuv norm to a run.

meerqat.ir.fuse.default_minimum(runs)[source]#
class meerqat.ir.fuse.Fusion(qrels: Optional[Union[str, Path, Qrels, List[str]]] = None, runs: Optional[Union[List[str], List[Run]]] = None, norm: Union[str, None, List[Optional[str]]] = 'zmuv', method: Union[str, None, List[Optional[str]]] = 'wsum', output: Optional[str] = None, defmin: Optional[bool] = False)[source]#

Bases: object

Optimize fusion using ranx

fit(metric: str = 'mrr@100')[source]#

Finds best parameters

test(best_params: dict, metrics: Optional[List[str]] = None)[source]#

Applies best parameters