Skip to content

Commit

Permalink
a note about k
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jul 13, 2021
1 parent 38809c7 commit 810e5cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/evaluation/topn-metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ To use this, pass extra arguments to :py:meth:`RecListAnalysis.add_metric`::
rla.add_metric(ndcg, k=5)
rla.add_metric(ndcg, name='ndcg_10', k=10)

The default is to allow unbounded lists. When using large recommendation lists, and users never have
more test ratings than there are recommended items, the default makes sense.
The default is to allow unbounded lists. When using large recommendation lists, if users never have
more test ratings than there are recommended items, the default makes sense. For short recommendation
lists you will usually need to specify ``k``. Unfortunately, there isn't a practical way to guess ``k``,
because shorter lists may mean that the recommender could not produce a full-length list.


Classification Metrics
Expand Down

0 comments on commit 810e5cf

Please sign in to comment.