lenskit.basic.popularity#
Classes
|
Score items by their popularity. |
|
Score items by their time-bounded popularity, i.e., the popularity in the most recent time_window period. |
- class lenskit.basic.popularity.PopScorer(score_method='quantile')#
-
Score items by their popularity. Use with
TopN
to get a most-popular-items recommender.- Parameters:
score_type –
The method for computing popularity scores. Can be one of the following:
'quantile'
(the default)'rank'
'count'
score_method (str)
- item_pop_#
Item popularity scores.
- class lenskit.basic.popularity.TimeBoundedPopScore(cutoff, score_method='quantile')#
Bases:
PopScorer
Score items by their time-bounded popularity, i.e., the popularity in the most recent time_window period. Use with
TopN
to get a most-popular-recent-items recommender.- Parameters:
time_window (datetime.timedelta) – The time window for computing popularity scores.
score_type (str) –
The method for computing popularity scores. Can be one of the following:
'quantile'
(the default)'rank'
'count'
cutoff (datetime)
score_method (str)
- item_scores_#
Time-bounded item popularity scores.
- Type: