RotatE
- class RotatE(*, embedding_dim=200, entity_initializer=<function xavier_uniform_>, relation_initializer=<function init_phases>, relation_constrainer=<function complex_normalize>, regularizer=None, regularizer_kwargs=None, **kwargs)[source]
Bases:
pykeen.models.nbase.ERModel
An implementation of RotatE from [sun2019].
RotatE models relations as rotations from head to tail entities in complex space:
\[\textbf{e}_t= \textbf{e}_h \odot \textbf{r}_r\]where \(\textbf{e}, \textbf{r} \in \mathbb{C}^{d}\) and the complex elements of \(\textbf{r}_r\) are restricted to have a modulus of one (\(\|\textbf{r}_r\| = 1\)). The interaction model is then defined as:
\[f(h,r,t) = -\|\textbf{e}_h \odot \textbf{r}_r - \textbf{e}_t\|\]which allows to model symmetry, antisymmetry, inversion, and composition.
See also
Authors’ implementation of RotatE
Initialize the module.
- Parameters
triples_factory – The triples factory facilitates access to the dataset.
interaction – 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 – The entity representation or sequence of representations
entity_representations_kwargs – additional keyword-based parameters for instantiation of entity representations
relation_representations – The relation representation or sequence of representations
relation_representations_kwargs – additional keyword-based parameters for instantiation of relation representations
skip_checks – whether to skip entity representation checks.
kwargs – Keyword arguments to pass to the base model
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
Attributes Documentation