lenskit.graphs.lightgcn.LightGCNConfig#
- class lenskit.graphs.lightgcn.LightGCNConfig#
Bases:
lenskit.config.common.EmbeddingSizeMixin,pydantic.BaseModelConfiguration for
LightGCNScorer.- Stability:
Experimental
- embedding_size: pydantic.PositiveInt = 16#
The dimension of the embedding space (number of latent features). Seems to work best as a power of 2.
- layer_count: pydantic.PositiveInt = 2#
The number of layers to use.
- layer_blend: pydantic.PositiveFloat | list[pydantic.PositiveFloat] | None = None#
The blending coefficient(s) for layer blending. This is equivalent to
alphainLightGCN.
- batch_size: pydantic.PositiveInt = 4096#
The training batch size.
- learning_rate: pydantic.PositiveFloat = 0.01#
The learning rate for training.
- epochs: pydantic.PositiveInt = 10#
The number of training epochs.
- loss: Literal['logistic', 'pairwise'] = 'pairwise'#
The loss to use for model training.
pairwiseBPR pairwise ranking loss, using
LightGCN.recommend_loss().logisticLogistic link prediction loss, using
LightGCN.link_pred_loss().
- check_layer_blending()#
- Return type:
Self