yujonglee's picture
Add empty test
9c1ad43
raw
history blame contribute delete
425 Bytes
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"]
)