ComplEx
- class ComplEx(*, embedding_dim=200, entity_initializer=<function normal_>, relation_initializer=<function normal_>, regularizer=<class 'pykeen.regularizers.LpRegularizer'>, regularizer_kwargs=None, **kwargs)[source]
Bases:
ERModelAn implementation of ComplEx [trouillon2016].
The ComplEx model combines complex-valued
pykeen.nn.Embeddingentity and relation representations with apykeen.nn.ComplExInteraction.Initialize ComplEx.
- Parameters:
embedding_dim (
int) – the embedding dimension to use for entity and relation embeddings, cf.Embedding.__init__()’s shape parameter.entity_initializer (
Union[str,Callable[[FloatTensor],FloatTensor],None]) – entity initializer function. Defaults totorch.nn.init.normal_(). cf.Embedding.__init__().relation_initializer (
Union[str,Callable[[FloatTensor],FloatTensor],None]) – relation initializer function. Defaults totorch.nn.init.normal_(). cf.Embedding.__init__().regularizer (
Union[str,Regularizer,Type[Regularizer],None]) – the regularizer to apply to both, entity and relation, representations.regularizer_kwargs (
Optional[Mapping[str,Any]]) – additional keyword arguments passed to the regularizer. Defaults to ComplEx.regularizer_default_kwargs.kwargs – remaining keyword arguments to forward to
pykeen.models.ERModel
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
The default parameters for the default loss function class
The LP settings used by [trouillon2016] for ComplEx.
Attributes Documentation
- hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}}
The default strategy for optimizing the model’s hyper-parameters