Mean Reciprocal Rank (MRR) is a statistical measure used primarily in the fields of information retrieval and natural language processing to evaluate the performance of systems that return a list of ranked results. It specifically assesses how well a search algorithm or recommendation system ranks relevant items in response to a query.
MRR is calculated by taking the reciprocal of the rank at which the first relevant result appears for each query, averaging these values across all queries. The formula for MRR is:
MRR = (1/Q) * Σ (1/rank_i)
where:
- Q is the total number of queries,
- rank_i is the position of the first relevant result for the i-th query.
For example, if for three queries the first relevant results are found at ranks 1, 2, and 3, the MRR would be calculated as:
MRR = (1/3) * (1/1 + 1/2 + 1/3) = (1/3) * (1 + 0.5 + 0.333) = 0.611
MRR is particularly useful in applications such as search engines, question-answering systems, and recommendation engines, where it is crucial to present the most relevant results to users as quickly as possible. A higher MRR indicates better performance, as it signifies that relevant results appear earlier in the ranked list.