LiteralModel
- class LiteralModel(triples_factory, interaction, entity_representations=None, entity_representations_kwargs=None, relation_representations=None, relation_representations_kwargs=None, **kwargs)[source]
Bases:
pykeen.models.nbase.ERModel[pykeen.typing.HeadRepresentation,pykeen.typing.RelationRepresentation,pykeen.typing.TailRepresentation]Base class for models with entity literals that uses combinations from
pykeen.nn.combinations.Initialize the module.
- Parameters
triples_factory (
TriplesNumericLiteralsFactory) – The triples factory facilitates access to the dataset.interaction (
LiteralInteraction) – The interaction module (e.g., TransE)interaction_kwargs – Additional key-word based parameters given to the interaction module’s constructor, if not already instantiated.
entity_representations (
Union[str,Representation,Type[Representation],None,Sequence[Union[str,Representation,Type[Representation],None]]]) – The entity representation or sequence of representationsentity_representations_kwargs (
Union[Mapping[str,Any],None,Sequence[Optional[Mapping[str,Any]]]]) – additional keyword-based parameters for instantiation of entity representationsrelation_representations (
Union[str,Representation,Type[Representation],None,Sequence[Union[str,Representation,Type[Representation],None]]]) – The relation representation or sequence of representationsrelation_representations_kwargs (
Union[Mapping[str,Any],None,Sequence[Optional[Mapping[str,Any]]]]) – additional keyword-based parameters for instantiation of relation representationsskip_checks – whether to skip entity representation checks.
kwargs – Keyword arguments to pass to the base model