lenskit.funksvd.FunkSVDScorer#
- class lenskit.funksvd.FunkSVDScorer(config=None, **kwargs)#
Bases:
lenskit.training.Trainable,lenskit.pipeline.Component[lenskit.data.ItemList]FunkSVD explicit-feedback matrix factoriation. FunkSVD is a regularized biased matrix factorization technique trained with featurewise stochastic gradient descent.
See the base class
MFPredictorfor documentation on the estimated parameters you can extract from a trained model.Deprecated since version LKPY: This scorer is kept around for historical comparability, but ALS
BiasedMFis usually a better option.- Stability:
- Caller (see Stability Levels).
- Parameters:
config (object | None)
kwargs (Any)
- config: FunkSVDConfig#
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.
- bias: lenskit.basic.BiasModel#
- users: lenskit.data.Vocabulary#
- user_embeddings: lenskit.data.types.NPMatrix#
- items: lenskit.data.Vocabulary#
- item_embeddings: lenskit.data.types.NPMatrix#
- is_trained()#
Query if this component has already been trained.
- train(data, options=TrainingOptions())#
Train a FunkSVD model.
- Parameters:
ratings – the ratings data frame.
data (lenskit.data.Dataset)
options (lenskit.training.TrainingOptions)
- __call__(query, items)#
Run the pipeline’s operation and produce a result. This is the key method for components to implement.
- Parameters:
query (lenskit.data.QueryInput)
items (lenskit.data.ItemList)
- Return type: