14/31
Part 4 of 6 · Yes-or-no metricsLearn and do
Reciprocal rank stops at the first relevant item
Some products care only about the first good result.
queries = [rel, [0, 0, 1, 1], [0, 0, 0]]
print([round(reciprocal_rank(q), 2) for q in queries])
print(round(np.mean([reciprocal_rank(q) for q in queries]), 2))
Three queries: the first relevant item at rank 1, at rank 3, and none at all. What is the MRR?
Pick one to see what it prints.
Pick an answer above to see the rest