lenskit.flexmf.FlexMFImplicitScorer#
- class lenskit.flexmf.FlexMFImplicitScorer(config=None, **kwargs)#
Bases:
lenskit.flexmf._base.FlexMFScorerBaseImplicit-feedback rating prediction with FlexMF. This is capable of realizing multiple models, including:
BPR-MF (Bayesian personalized ranking) [RFGSchmidtThieme09] (with
"pairwise"loss)Logistic matrix factorization [Joh14] (with
"logistic"loss)
All use configurable negative sampling, including the sampling approach from WARP.
- Stability:
Experimental
- Parameters:
config (object | None)
kwargs (Any)
- config: FlexMFImplicitConfig#
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.
- __call__(query, items)#
Generate item scores for a user.
Note that user and items are both user and item IDs, not positions.
- Parameters:
query (lenskit.data.QueryInput)
items (lenskit.data.ItemList)
- Return type:
- create_trainer(data, options)#
Create a model trainer to train this model.