Spaces:
Sleeping
Sleeping
Readme
Browse files- ranking_evaluator.py +2 -2
ranking_evaluator.py
CHANGED
@@ -14,7 +14,7 @@ _CITATION = """\
|
|
14 |
"""
|
15 |
|
16 |
_DESCRIPTION = """\
|
17 |
-
A metric to evaluate ranking tasks using the TREC evaluation tool. It compares predicted rankings of items (e.g., documents) with their true relevance scores. The metric takes two inputs: references (true relevance scores) and predictions (predicted scores), both as lists of lists, where each (i, j) is the truth or the predicted score of the document j in the query i. In a nutshell: simplifies the usage of TREC to compute ranking metrics given scores per sample.
|
18 |
"""
|
19 |
|
20 |
_KWARGS_DESCRIPTION = """ Computes MAP, P@K, RR, and NDCG using the TREC evaluation tool.
|
@@ -27,7 +27,7 @@ Returns:
|
|
27 |
Dict: the set of TREC's metrics scores
|
28 |
|
29 |
Example:
|
30 |
-
# (i, j) means the truth/predicted score of the document j in the query i
|
31 |
references = [[5, 0, 3, 0, 0, 2, 1],
|
32 |
[5, 0, 3, 0, 0, 2, 1],
|
33 |
[5, 0, 3, 0, 0, 2, 1],
|
|
|
14 |
"""
|
15 |
|
16 |
_DESCRIPTION = """\
|
17 |
+
A metric to evaluate ranking tasks using the TREC evaluation tool. It compares predicted rankings of items (e.g., documents) with their true relevance scores. The metric takes two inputs: references (true relevance scores) and predictions (predicted scores), both as lists of lists, where each (i, j) is the truth or the predicted score of the document j in the collection for the query i. In a nutshell: simplifies the usage of TREC to compute ranking metrics given scores per sample.
|
18 |
"""
|
19 |
|
20 |
_KWARGS_DESCRIPTION = """ Computes MAP, P@K, RR, and NDCG using the TREC evaluation tool.
|
|
|
27 |
Dict: the set of TREC's metrics scores
|
28 |
|
29 |
Example:
|
30 |
+
# (i, j) means the truth/predicted score of the document j in the collection for the query i
|
31 |
references = [[5, 0, 3, 0, 0, 2, 1],
|
32 |
[5, 0, 3, 0, 0, 2, 1],
|
33 |
[5, 0, 3, 0, 0, 2, 1],
|