lenskit.graphs.lightgcn#
LightGCN recommendation.
Classes
|
Configuration for |
|
Scorer using |
|
|
|
|
|
- class lenskit.graphs.lightgcn.LightGCNConfig(embedding_size=64, layer_count=2, layer_blend=None, batch_size=8192, learning_rate=0.01, epochs=10, regularization=0.01, loss='pairwise')#
Bases:
object
Configuration for
LightGCNScorer
.- Stability:
Experimental
- Parameters:
- embedding_size: Annotated[int, Gt(gt=0)] = 64#
The dimension of the embedding space (number of latent features). Seems to work best as a power of 2.
- class lenskit.graphs.lightgcn.LightGCNScorer(config=None, **kwargs)#
Bases:
UsesTrainer
,Component
[ItemList
, …]Scorer using
LightGCN
[].- Stability:
Experimental
- Parameters:
config (LightGCNConfig)
kwargs (Any)
- to(device)#
Move the model to a different device.
- create_trainer(data, options)#
Create a model trainer to train this model.
- class lenskit.graphs.lightgcn.LightGCNTrainer(scorer, data, options)#
Bases:
ModelTrainer
- Parameters:
scorer (LightGCNScorer)
data (Dataset)
options (TrainingOptions)
- train_epoch()#
Perform one epoch of the training process, optionally returning metrics on the training behavior. After each training iteration, the mmodel must be usable.
- finalize()#
Finish the training process, cleaning up any unneeded data structures and doing any finalization steps to the model.
- class lenskit.graphs.lightgcn.LogisticLightGCNTrainer(scorer, data, options)#
Bases:
LightGCNTrainer
- Parameters:
scorer (LightGCNScorer)
data (Dataset)
options (TrainingOptions)
- class lenskit.graphs.lightgcn.PairwiseLightGCNTrainer(scorer, data, options)#
Bases:
LightGCNTrainer
- Parameters:
scorer (LightGCNScorer)
data (Dataset)
options (TrainingOptions)