LiteralModel
- class LiteralModel(triples_factory, interaction, entity_representations=None, entity_representations_kwargs=None, combination=None, combination_kwargs=None, **kwargs)[source]
Bases:
ERModel[Tuple[FloatTensor,FloatTensor],FloatTensor,Tuple[FloatTensor,FloatTensor]]Base class for models with entity literals that uses combinations from
pykeen.nn.combinations.Initialize the model.
- Parameters:
triples_factory (
TriplesNumericLiteralsFactory) – the (training) triples factoryinteraction (
Union[str,Interaction[FloatTensor,FloatTensor,FloatTensor],Type[Interaction[FloatTensor,FloatTensor,FloatTensor]],None]) – the interaction functionentity_representations (
Union[str,Representation,Type[Representation],None,Sequence[Union[str,Representation,Type[Representation],None]]]) – the entity representations (excluding the ones from literals)entity_representations_kwargs (
Union[Mapping[str,Any],None,Sequence[Optional[Mapping[str,Any]]]]) – the entity representations keyword-based parameters (excluding the ones from literals)combination (
Union[str,Combination,Type[Combination],None]) – the combination for entity and literal representationscombination_kwargs (
Optional[Mapping[str,Any]]) – keyword-based parameters for instantiating the combinationkwargs – additional keyword-based parameters passed to
ERModel.__init__()