lenskit.basic.history#
Components that look up user history from the training data.
Classes
|
Score items by returning their values from the training data. |
|
Look up a user's history from the training data. |
- class lenskit.basic.history.UserTrainingHistoryLookup(*args, **kwargs)#
-
Look up a user’s history from the training data.
- class lenskit.basic.history.KnownRatingScorer(score=None, source='training')#
-
Score items by returning their values from the training data.
- Parameters:
score (Literal['rating', 'indicator'] | None) – Whether to score items with their rating values, or a 0/1 indicator of their presence in the training data. The default (
None
) uses ratings if available, and otherwise scores with 1 for interacted items and leaves non-interacted items unscored.source (Literal['training', 'query']) – Whether to use the training data or the user’s history represented in the query as the source of score data.