lenskit.graphs.lightgcn.LightGCNScorer#

class lenskit.graphs.lightgcn.LightGCNScorer(config=None, **kwargs)#

Bases: lenskit.training.UsesTrainer, lenskit.pipeline.components.Component[lenskit.data.ItemList]

Scorer using LightGCN [].

Stability:

Experimental

Parameters:
  • config (object | None)

  • kwargs (Any)

config: LightGCNConfig#

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.

users: lenskit.data.Vocabulary#
items: lenskit.data.Vocabulary#
model: torch_geometric.nn.LightGCN#
to(device)#

Move the model to a different device.

__call__(query, items)#

Generate item scores for a user.

Note that user and items are both user and item IDs, not positions.

Parameters:
Return type:

lenskit.data.ItemList

create_trainer(data, options)#

Create a model trainer to train this model.