UM
- class UM(*, embedding_dim: int = 50, scoring_fct_norm: int = 1, power_norm: bool = False, entity_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function xavier_normal_>, **kwargs)[source]
Bases:
ERModel
[Tensor
,tuple
[()],Tensor
]An implementation of the Unstructured Model (UM) published by [bordes2014].
This model represents entities as \(d\)-dimensional vectors stored in
Embedding
. It does not have any relation representations. TheUMInteraction
is used to calculate scores.Initialize UM.
- Parameters:
embedding_dim (int) – The entity embedding dimension \(d\). Is usually \(d \in [50, 300]\).
scoring_fct_norm (int) – The norm used with
torch.linalg.vector_norm()
. Typically is 1 or 2.power_norm (bool) – Whether to use the p-th power of the \(L_p\) norm. It has the advantage of being differentiable around 0, and numerically more stable.
entity_initializer (str | Callable[[Tensor], Tensor] | None) – The initializer for the entity embeddings. Defaults to
pykeen.nn.init.xavier_normal()
.kwargs – Remaining keyword arguments passed through to
ERModel
.
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
Attributes Documentation