lenskit.basic.popularity.TimeBoundedPopScore#
- class lenskit.basic.popularity.TimeBoundedPopScore(config=None, **kwargs)#
Bases:
PopScorerScore items by their time-bounded popularity, i.e., the popularity in the most recent time_window period. Use with
TopNto get a most-popular-recent-items recommender.- Parameters:
config (object | None)
kwargs (Any)
- item_scores_#
Time-bounded item popularity scores.
- Type:
- 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:
data (lenskit.data.Dataset) – The training dataset.
options (lenskit.training.TrainingOptions) – The training options.