MCPcopy Create free account

hub / github.com/AmenRa/ranx / functions

Functions578 in github.com/AmenRa/ranx

↓ 97 callersMethodkeys
Returns query ids. Used internally.
ranx/data_structures/run.py:77
↓ 48 callersFunctionevaluate
Compute the performance scores for the provided `qrels` and `run` for all the specified metrics. Usage examples: from ranx import evaluate
ranx/meta/evaluate.py:65
↓ 26 callersFunctioncreate_empty_results_dict
()
ranx/fusion/common.py:19
↓ 26 callersMethodto_typed_list
Convert Run to Numba Typed List. Used internally.
ranx/data_structures/run.py:161
↓ 26 callersFunctionto_unicode
Forces type conversion to numba.types.unicode_type.
ranx/fusion/common.py:13
↓ 25 callersFunctionconvert_results_dict_list_to_run
(q_ids, results_dict_list)
ranx/fusion/common.py:32
↓ 25 callersFunctioncreate_empty_results_dict_list
(length)
ranx/fusion/common.py:27
↓ 21 callersMethodadd_score
Add a (doc_id, score) pair to a query (or, change its value if it already exists). Args: q_id (str): Query ID doc_id
ranx/data_structures/run.py:81
↓ 21 callersMethodadd_score
Add a (doc_id, score) pair to a query (or, change its value if it already exists). Args: q_id (str): Query ID doc_id
ranx/data_structures/qrels.py:93
↓ 19 callersMethodsort
Sort. Used internally.
ranx/data_structures/run.py:136
↓ 14 callersMethodfrom_dict
Convert a Python dictionary in form of {q_id: {doc_id: score}} to ranx.Run. Args: d (Dict[str, Dict[str, int]]): Run as Python di
ranx/data_structures/run.py:228
↓ 12 callersMethodkeys
Returns query ids. Used internally.
ranx/data_structures/qrels.py:89
↓ 11 callersFunctionclean_qrels
(qrels, rel_lvl)
ranx/metrics/common.py:6
↓ 10 callersFunctioncomb_sum
r"""Computes CombSUM as proposed by [Fox et al.](https://trec.nist.gov/pubs/trec2/papers/txt/23.txt). ```bibtex @inproceedings{DBLP:conf/
ranx/fusion/comb_sum.py:44
↓ 9 callersFunctionget_file_kind
(path: str = "run.json", kind: str = None)
ranx/data_structures/run.py:398
↓ 9 callersMethodget_stat_test_label
(self, stat_test: str)
ranx/data_structures/report.py:127
↓ 8 callersFunctionfix_k
(k, run)
ranx/metrics/common.py:11
↓ 8 callersFunctionget_file_kind
(path: str = "qrels.json", kind: str = None)
ranx/data_structures/qrels.py:370
↓ 8 callersMethodto_dict
Convert Run to Python dictionary. Returns: Dict[str, Dict[str, int]]: Run as Python dictionary
ranx/data_structures/run.py:167
↓ 7 callersFunctioncompare
Evaluate multiple `runs` and compute statistical tests. Usage example: ```python from ranx import compare # Compare different runs a
ranx/meta/compare.py:11
↓ 7 callersFunctioncreate_empty_results_dict
()
ranx/normalization/common.py:14
↓ 7 callersMethodfrom_file
Parse a run file into ranx.Run. Supported formats are JSON, TREC run, gzipped TREC run, and LZ4. Correct import behavior is inferred from the file ext
ranx/data_structures/run.py:261
↓ 6 callersMethodadd_multi
Add multiple queries at once. Args: q_ids (List[str]): List of Query IDs doc_ids (List[List[str]]): List of list of D
ranx/data_structures/run.py:107
↓ 6 callersMethodadd_multi
Add multiple queries at once. Args: q_ids (List[str]): List of Query IDs doc_ids (List[List[str]]): List of list of D
ranx/data_structures/qrels.py:119
↓ 6 callersFunctionconvert_results_dict_list_to_run
(q_ids, results_dict_list)
ranx/normalization/common.py:27
↓ 6 callersFunctioncreate_empty_results_dict_list
(length)
ranx/normalization/common.py:22
↓ 6 callersFunctionget_hit_lists
Compute the hit lists (at k). **Hit list** is a binary list whose element in position p is 1 if the document retrieved in position p is relevant,
ranx/metrics/get_hit_lists.py:47
↓ 6 callersFunctionnorm_switch
(method: str = "min-max")
ranx/normalization/__init__.py:18
↓ 5 callersMethodfrom_df
Convert a Pandas DataFrame to ranx.Run. Args: df (pd.DataFrame): Run as Pandas DataFrame q_id_col (str, optional): Qu
ranx/data_structures/run.py:294
↓ 5 callersFunctionoptimize_weights
( fusion_method: Callable, qrels: Qrels, runs: List[Run], metric: str, step: float = 0.1,
ranx/fusion_optimization/optimize_weights.py:20
↓ 5 callersFunctionto_unicode
Forces type conversion to numba.types.unicode_type.
ranx/normalization/common.py:8
↓ 4 callersFunction_hits
(qrels, run, k, rel_lvl)
ranx/metrics/hits.py:12
↓ 4 callersFunctioncreate_and_sort
(q_ids, doc_ids, scores)
ranx/data_structures/common.py:131
↓ 4 callersFunctionextract_scores
Extract the scores from a given results dictionary.
ranx/normalization/common.py:37
↓ 4 callersMethodfrom_dict
Convert a Python dictionary in form of {q_id: {doc_id: score}} to ranx.Qrels. Args: d (Dict[str, Dict[str, int]]): Qrels as Pytho
ranx/data_structures/qrels.py:221
↓ 4 callersFunctionrbc
r"""Computes Rank-Biased Centroid (RBC) as proposed by [Bailey et al.](https://dl.acm.org/doi/10.1145/3077136.3080839). ```bibtex @inproceedi
ranx/fusion/rbc.py:38
↓ 4 callersFunctionslidefuse_train
(qrels: Qrels, runs: List[Run])
ranx/fusion/slidefuse.py:98
↓ 4 callersFunctionsort_dict_by_key
(d)
ranx/data_structures/common.py:63
↓ 4 callersFunctionsort_dict_of_dict_by_value
(d)
ranx/data_structures/common.py:89
↓ 4 callersMethodto_dataframe
Convert Run to Pandas DataFrame with the following columns: `q_id`, `doc_id`, and `score`. Returns: pandas.DataFrame: Run as Pand
ranx/data_structures/run.py:178
↓ 4 callersMethodto_latex
Returns Report as LaTeX table. Returns: str: LaTeX table
ranx/data_structures/report.py:181
↓ 3 callersFunction_dcg
(qrels, run, k, rel_lvl, jarvelin)
ranx/metrics/ndcg.py:12
↓ 3 callersFunction_estimate_log_odds
(hit_lists, cut_offs)
ranx/fusion/bayesfuse.py:56
↓ 3 callersFunction_isr_score_parallel
(run)
ranx/fusion/isr.py:28
↓ 3 callersFunctioncomb_gmnz
r"""Computes CombGMNZ as proposed by [Joon Ho Lee](https://dl.acm.org/doi/10.1145/258525.258587). ```bibtex @inproceedings{DBLP:conf/sigi
ranx/fusion/comb_gmnz.py:44
↓ 3 callersFunctioncomb_mnz
r"""Computes CombMNZ as proposed by [Fox et al.](https://trec.nist.gov/pubs/trec2/papers/txt/23.txt).<br /> ```bibtex @inproceedings{DBLP
ranx/fusion/comb_mnz.py:44
↓ 3 callersFunctioncreate_dict_from_lists
(keys, values)
ranx/data_structures/common.py:47
↓ 3 callersFunctionget_candidates
(runs)
ranx/fusion/bordafuse.py:17
↓ 3 callersFunctionget_results
(runs)
ranx/fusion/condorcet.py:35
↓ 3 callersFunctionmin_max_norm
Apply `min_max norm` to a given run. Args: run (Run): Run to be normalized. Returns: Run: Normalized run.
ranx/normalization/min_max_norm.py:50
↓ 3 callersFunctionposfuse_train
(qrels: Qrels, runs: List[Run])
ranx/fusion/posfuse.py:88
↓ 3 callersFunctionrank_biased_precision
r"""Compute Rank-biased Precision (RBP). It is defined as: $$ \operatorname{RBP} = (1 - p) \cdot \sum_{i=1}^{d}{r_i \cdot p^{i - 1}}
ranx/metrics/rank_biased_precision.py:47
↓ 3 callersMethodsave
Write `run` to `path` as JSON file, TREC run, LZ4 file, or Parquet file. File type is automatically inferred form the filename extension: ".json" -> "
ranx/data_structures/run.py:194
↓ 3 callersFunctionsegfuse_train
(qrels: Qrels, runs: List[Run])
ranx/fusion/segfuse.py:119
↓ 3 callersFunctionslidefuse
r"""Computes SlideFuse as proposed by [Lillis et al.](https://link.springer.com/chapter/10.1007/978-3-540-78646-7_33). ```bibtex @inproceedin
ranx/fusion/slidefuse.py:43
↓ 2 callersFunction_borda_score_parallel
(run, candidates)
ranx/fusion/bordafuse.py:51
↓ 2 callersFunction_dcg_parallel
(qrels, run, k, rel_lvl, jarvelin)
ranx/metrics/ndcg.py:44
↓ 2 callersFunction_get_hit_list
(qrels, run, k, rel_lvl)
ranx/metrics/get_hit_lists.py:13
↓ 2 callersFunction_get_run_indices
(results, candidates)
ranx/fusion/condorcet.py:47
↓ 2 callersFunction_get_unjudged_list
(qrels, run, k)
ranx/metrics/get_unjudged_lists.py:12
↓ 2 callersFunction_ndcg_parallel
(qrels, run, k, rel_lvl, jarvelin)
ranx/metrics/ndcg.py:69
↓ 2 callersFunction_precision
(qrels, run, k, rel_lvl)
ranx/metrics/precision.py:12
↓ 2 callersFunctionadd_and_sort
(d, q_ids, doc_ids, scores)
ranx/data_structures/common.py:108
↓ 2 callersFunctionbayesfuse_train
(qrels: Qrels, runs: List[Run])
ranx/fusion/bayesfuse.py:162
↓ 2 callersFunctionbordafuse
r"""Computes BordaFuse as proposed by [Aslam et al.](https://dl.acm.org/doi/10.1145/383952.384007). ```bibtex @inproceedings{DBLP:conf/sigir/
ranx/fusion/bordafuse.py:61
↓ 2 callersFunctioncondorcet
r"""Computes CondorcetFuse as proposed by [Montague et al.](https://dl.acm.org/doi/10.1145/584792.584881). ```bibtex @inproceedings{DBLP:conf
ranx/fusion/condorcet.py:97
↓ 2 callersFunctioncreate_empty_results_dict
()
ranx/data_structures/generic.py:7
↓ 2 callersFunctiondownloader
(url: str, path: str, file_size: int, resume_byte_pos: int = None)
ranx/downloader.py:12
↓ 2 callersFunctionestimate_probfuse_probs
(qrels: Qrels, runs: List[Run], n_segments: int)
ranx/fusion/probfuse.py:51
↓ 2 callersFunctionestimate_probs_multi
(qrels: Qrels, runs: List[Run])
ranx/fusion/common.py:61
↓ 2 callersFunctionf1
r"""Compute F1 (at k). **F1** is the harmonic mean of [**Precision**][ranx.metrics.precision] and [**Recall**][ranx.metrics.recall].<br /> If
ranx/metrics/f1.py:41
↓ 2 callersFunctionformat_metrics
(metrics: Union[List[str], str])
ranx/meta/evaluate.py:13
↓ 2 callersMethodformat_score
(self, score)
ranx/data_structures/report.py:92
↓ 2 callersMethodfrom_parquet
Convert a Parquet file to ranx.Run. Args: path (str): File path. q_id_col (str, optional): Query IDs column. Defaults
ranx/data_structures/run.py:332
↓ 2 callersFunctionget_candidates
(runs)
ranx/fusion/condorcet.py:18
↓ 2 callersMethodget_metric_label
(self, m)
ranx/data_structures/report.py:109
↓ 2 callersFunctionload_lz4
(path: str)
ranx/io.py:64
↓ 2 callersFunctionlogn_isr
r"""Computes Log_ISR as proposed by [Mourão et al.](https://www.sciencedirect.com/science/article/abs/pii/S0895611114000664).<br /> ```bibtex
ranx/fusion/logn_isr.py:45
↓ 2 callersMethodmake_comparable
Adds empty results for queries missing from the run and removes those not appearing in qrels.
ranx/data_structures/run.py:142
↓ 2 callersFunctionmapfuse_train
(qrels: Qrels, runs: List[Run])
ranx/fusion/mapfuse.py:89
↓ 2 callersFunctionmixed
r"""Computes Mixed as proposed by [Wu et al.](https://dl.acm.org/doi/10.1145/584792.584908). ```bibtex @inproceedings{DBLP:conf/cikm/WuC0
ranx/fusion/mixed.py:51
↓ 2 callersFunctionoptimization_switch
(method: str)
ranx/fusion_optimization/__init__.py:55
↓ 2 callersFunctionprecision
r"""Compute Precision (at k). **Precision** is the proportion of the retrieved documents that are relevant.<br /> If k > 0, only the top-k re
ranx/metrics/precision.py:29
↓ 2 callersFunctionprobfuse
r"""Computes ProbFuse as proposed by [Lillis et al.](https://dl.acm.org/doi/10.1145/1148170.1148197). ```bibtex @inproceedings{DBLP:conf/sigi
ranx/fusion/probfuse.py:89
↓ 2 callersFunctionprobfuse_train
(qrels: Qrels, runs: List[Run], n_segments: int)
ranx/fusion/probfuse.py:135
↓ 2 callersFunctionpython_dict_to_typed_list
Converts a nested Python Dictionary to Numba Typed List to be used with ranx's metrics with no effort. Note: Doc IDs will be hashed.
ranx/utils.py:24
↓ 2 callersFunctionrecall
r"""Compute Recall (at k). **Recall** is the ratio between the retrieved documents that are relevant and the total number of relevant documents.<
ranx/metrics/recall.py:34
↓ 2 callersFunctionrrf
r"""Computes Reciprocal Rank Fusion as proposed by [Cormack et al.](https://dl.acm.org/doi/10.1145/1571941.1572114). ```bibtex @inproceed
ranx/fusion/rrf.py:39
↓ 2 callersFunctionsafe_max
(x)
ranx/normalization/common.py:46
↓ 2 callersFunctionsafe_min
(x)
ranx/normalization/common.py:53
↓ 2 callersFunctionsave_lz4
(content: dict, path: str)
ranx/io.py:57
↓ 2 callersMethodsort
Sort. Used internally.
ranx/data_structures/qrels.py:152
↓ 2 callersMethodstyle_best
(self, x)
ranx/data_structures/optimization_report.py:82
↓ 2 callersMethodto_dict
Convert Qrels to Python dictionary. Returns: Dict[str, Dict[str, int]]: Qrels as Python dictionary
ranx/data_structures/qrels.py:164
↓ 2 callersMethodto_dict
Returns the Report data as a Python dictionary. ``` { "stat_test": "fisher" # metrics and model_names allows
ranx/data_structures/report.py:253
↓ 2 callersMethodto_table
(self)
ranx/data_structures/report.py:130
↓ 2 callersMethodto_table
(self)
ranx/data_structures/optimization_report.py:85
↓ 2 callersFunctionto_typed_list
(d)
ranx/data_structures/common.py:8
↓ 2 callersFunctionweighted_bordafuse
r"""Computes Weighted BordaFuse as proposed by [Aslam et al.](https://dl.acm.org/doi/10.1145/383952.384007). ```bibtex @inproceedings{DBLP:co
ranx/fusion/weighted_bordafuse.py:8
↓ 2 callersFunctionweighted_condorcet
r"""Computes Weighted CondorcetFuse as proposed by [Montague et al.](https://dl.acm.org/doi/10.1145/584792.584881). ```bibtex @inproceedings{
ranx/fusion/weighted_condorcet.py:58
next →1–100 of 578, ranked by callers