lenskit.basic.history.UserTrainingHistoryLookup#

class lenskit.basic.history.UserTrainingHistoryLookup(config=None, **kwargs)#

Bases: lenskit.pipeline.Component[lenskit.data.ItemList], lenskit.training.Trainable

Look up a user’s history from the training data.

Stability:
Caller (see Stability Levels).
Parameters:
  • config (object | None)

  • kwargs (Any)

config: LookupConfig#

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.

interactions: lenskit.data.MatrixRelationshipSet | None#
is_trained()#

Query if this component has already been trained.

train(data, options=TrainingOptions())#

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

Parameters:
__call__(query)#

Look up the user’s data from the training history (if needed), and ensure a fully-populated RecQuery.

Parameters:

query (lenskit.data.QueryInput)

Return type:

lenskit.data.RecQuery