DistMA
- class DistMA(embedding_dim: int = 256, entity_initializer: str | Callable[[Tensor], Tensor] | None = None, entity_initializer_kwargs: Mapping[str, Any] | None = None, entity_normalizer: str | Callable[[Tensor], Tensor] | None = None, entity_normalizer_kwargs: Mapping[str, Any] | None = None, relation_initializer: str | Callable[[Tensor], Tensor] | None = None, relation_initializer_kwargs: Mapping[str, Any] | None = None, **kwargs)[source]
Bases:
ERModel
[Tensor
,Tensor
,Tensor
]An implementation of DistMA from [shi2019].
It models entities and relations by \(d\)-dimensional vectors stored in
Embedding
, and theDistMAInteraction
to obtain triple scores.Initialize the model.
- Parameters:
embedding_dim (int) – The entity embedding dimension \(d\).
entity_initializer (str | Callable[[Tensor], Tensor] | None) – Entity initializer function. Defaults to None
entity_initializer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the entity initializer
entity_normalizer (str | Callable[[Tensor], Tensor] | None) – Entity normalizer function. Defaults to None
entity_normalizer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the entity normalizer
relation_initializer (str | Callable[[Tensor], Tensor] | None) – Relation initializer function. Defaults to None
relation_initializer_kwargs (Mapping[str, Any] | None) – Keyword arguments to be used when calling the relation initializer
kwargs – Remaining keyword arguments passed through to
pykeen.models.ERModel
.
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
Attributes Documentation