P1: Trim: 6.125in×9.25in Top: 0.5in Gutter: 0.75in
CUUS2079-09 CUUS2079-Zafarani 978 1 107 01885 3 January 13, 2014 17:28
9.4 Evaluating Recommendations 265
Table 9.5.Partitioning of Items with Respect to Their
Selection for Recommendation and Their Relevancy
Selected Not Selected Total
Relevant Nrs Nrn Nr
Irrelevant Nis Nin Ni
Total Ns Nn N
relevantorirrelevant. Based on the selection of items for recommendations
and their relevancy, we can have the four types of items outlined in Table9.5.
Given this table, we can define measures that use relevancy information
provided by users.Precisionis one such measure. It defines the fraction of
relevant items among recommended items:
P=
Nrs
Ns
. (9.77)
Similarly, we can userecallto evaluate a recommender algorithm, which
provides the probability of selecting a relevant item for recommendation:
R=
Nrs
Nr
. (9.78)
We can also combine both precision and recall by taking their harmonic
mean in theF-measure:
F=
2 PR
P+R
. (9.79)
Example 9.7.Consider the following recommendation relevancy matrix
for a set of 40 items. For this table, the precision, recall, and F-measure
values are
Selected Not Selected Total
Relevant 9 15 24
Irrelevant 3 13 16
Total 12 28 40