1 if any relevant item falls in the top k, 0 otherwise. The
coarsest cutoff metric: it ignores how many hits there were and
where they sat.
Usage
HitsR(pred_rank, relevant, k)
Arguments
- pred_rank
Ranked item ids, best first.
- relevant
Relevant item ids.
- k
Cutoff rank.
Value
Named list with estimate, hits, hit, k,
n_relevant, method.
References
Standard IR metric; no single owning source.
Examples
HitsR(c(1, 2, 3), c(2, 9), 2)
#> $estimate
#> [1] 1
#>
#> $hits
#> [1] 1
#>
#> $hit
#> [1] TRUE
#>
#> $k
#> [1] 2
#>
#> $n_relevant
#> [1] 2
#>
#> $method
#> [1] "hit rate at k"
#>