Spaces:
Runtime error
Runtime error
File size: 425 Bytes
3f145f5 9c1ad43 3f145f5 9c1ad43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
test_cases = [
{
"predictions": [0, 0],
"references": [1, 1],
"result": {"mean_average_precision": 1.0},
},
]
from mean_average_precision import mean_average_precision
m = mean_average_precision()
for test_case in test_cases:
assert (
m.compute(
predictions=test_case["predictions"], references=test_case["references"]
)
== test_case["result"]
)
|