The share of a recommendation list that is both unexpected and relevant.
Let RS be the recommended set, PM the set a primitive prediction model
(the baseline the user would have expected anyway) would have produced,
and REL the set the user actually found useful. The unexpected set is
UNEXP = RS \ PM and serendipity is
SRDP = card(UNEXP and REL) / card(RS).
Value
List with estimate (serendipity), serendipity,
unexpectedness, precision, recall,
n_unexpected, n_serendipitous, n_recommended,
n_baseline, n_relevant, n_universe, tp,
fp, fn, tn, method.
Details
Adamopoulos & Tuzhilin's unexpectedness of the list relative to the
expected set is reported alongside as card(RS \ PM) / card(RS);
serendipity is that quantity restricted to items the user valued, so
SRDP <= unexpectedness and SRDP <= precision always.
Sets are compared by identity, not by position: repeated ids collapse.
References
Ge, M., Delgado-Battenfeld, C. & Jannach, D. (2010). Beyond accuracy: evaluating recommender systems by coverage and serendipity. Proceedings of the Fourth ACM Conference on Recommender Systems, 257-260. doi:10.1145/1864708.1864761 ; Adamopoulos, P. & Tuzhilin, A. (2014). On unexpectedness in recommender systems: or how to better expect the unexpected. ACM Transactions on Intelligent Systems and Technology 5(4), 54. doi:10.1145/2559952
Examples
ServR(pred = c(1, 2, 3, 4, 5, 6, 7, 8), baseline = c(1, 2, 3, 4, 5, 6, 7, 8),
relevant = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0
#>
#> $serendipity
#> [1] 0
#>
#> $unexpectedness
#> [1] 0
#>
#> $precision
#> [1] 1
#>
#> $recall
#> [1] 1
#>
#> $n_unexpected
#> [1] 0
#>
#> $n_serendipitous
#> [1] 0
#>
#> $n_recommended
#> [1] 8
#>
#> $n_baseline
#> [1] 8
#>
#> $n_relevant
#> [1] 8
#>
#> $n_universe
#> [1] 8
#>
#> $tp
#> [1] 8
#>
#> $fp
#> [1] 0
#>
#> $fn
#> [1] 0
#>
#> $tn
#> [1] 0
#>
#> $method
#> [1] "Serendipity of a recommendation list (Ge et al. 2010; Adamopoulos & Tuzhilin 2014)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
