lenskit.basic.popularity.TimeBoundedPopScore#

class lenskit.basic.popularity.TimeBoundedPopScore(config=None, **kwargs)#

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:
  • config (object | None)

  • kwargs (Any)

item_scores_#

Time-bounded item popularity scores.

Type:

pandas.Series

config: TimeBoundedPopConfig#

The component configuration object. Component classes that support configuration must redefine this attribute with their specific configuration class type, which can be a Python dataclass or a Pydantic model class.

train(data, options=TrainingOptions())#

Train the model to learn its parameters from a training dataset.

Parameters: