lenskit.knn.ease#
EASE scoring model.
Classes
|
Configuration for |
|
Embarrassingly shallow autoencoder [Ste19]. |
- class lenskit.knn.ease.EASEConfig(*, regularization=1)#
Bases:
BaseModelConfiguration for
EASEScorer.- model_config = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class lenskit.knn.ease.EASEScorer(config=None, **kwargs)#
Bases:
Component[ItemList, …],TrainableEmbarrassingly shallow autoencoder [Ste19].
In addition to its configuation, this component also uses a training environment variable:
- Parameters:
config (EASEConfig)
kwargs (Any)
- LK_EASE_SOLVER#
Specify the solver to use to invert the Gram-matrix for EASE. Can be either
"torch"(works on both CPU and CUDA, and is faster on CPU than SciPy) or"scipy"(uses LAPACK, and may take less memory).The default behavior is to first try to allocate enough memory to train with PyTorch, and to fall back to SciPy with in-place solving if the Torch allocation fails.
Note
This component requires SciPy 1.17 or later.
- items: Vocabulary#
Items known at training time.
- train(data, options=None)#
Train the model to learn its parameters from a training dataset.
- Parameters:
data (Dataset) – The training dataset.
options (TrainingOptions | None) – The training options.