[FEATURE] Add r-precision metric
daviddavo opened this issue · comments
Description
R-precision can be defined as the precision@R, with R being the number of relevant documents for the query [1]. This means that for a certain user
[1]: C. D. Manning, P. Raghavan, and H. Schütze, ‘Chapter 8. Evaluation in information retrieval’, in Introduction to information retrieval, New York: Cambridge University Press, 2008, pp. 151–175.
Expected behavior with the suggested feature
Adding R-Precision will allow evaluating systems with some characteristics.
Other comments
Implementation idea:
- Get the number of relevant documents (R) for all users
- Get the top-k recommendations of the model where
$k = \max R$ - Calculate the R-precision for each user, and return the mean as in other metrics
@daviddavo would you be able to contribute to this?