PairRE

class PairRE(embedding_dim=200, p=1, power_norm=False, entity_initializer=<function uniform_>, entity_initializer_kwargs=None, entity_normalizer=<function normalize>, entity_normalizer_kwargs=None, relation_initializer=<function uniform_>, relation_initializer_kwargs=None, **kwargs)[source]

Bases: pykeen.models.nbase.ERModel

An implementation of PairRE from [chao2020].

Initialize PairRE via the pykeen.nn.modules.PairREInteraction interaction.

Parameters

Attributes Summary

default_entity_normalizer_kwargs

The default entity normalizer parameters The entity representations are normalized to L2 unit length cf.

hpo_default

The default strategy for optimizing the model's hyper-parameters

Attributes Documentation

default_entity_normalizer_kwargs: ClassVar[Mapping[str, Any]] = {'dim': -1, 'p': 2}

The default entity normalizer parameters The entity representations are normalized to L2 unit length cf. https://github.com/alipay/KnowledgeGraphEmbeddingsViaPairedRelationVectors_PairRE/blob/0a95bcd54759207984c670af92ceefa19dd248ad/biokg/model.py#L232-L240 # noqa: E501

hpo_default: ClassVar[Mapping[str, Any]] = {'embedding_dim': {'high': 256, 'low': 16, 'q': 16, 'type': <class 'int'>}, 'p': {'high': 2, 'low': 1, 'type': <class 'int'>}}

The default strategy for optimizing the model’s hyper-parameters