RESCAL

class RESCAL(*, embedding_dim: int = 50, entity_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function uniform_>, relation_initializer: str | ~typing.Callable[[~torch.Tensor], ~torch.Tensor] | None = <function uniform_>, regularizer: str | ~pykeen.regularizers.Regularizer | type[~pykeen.regularizers.Regularizer] | None = None, regularizer_kwargs: ~collections.abc.Mapping[str, ~typing.Any] | None = None, **kwargs)[source]

Bases: ERModel[Tensor, Tensor, Tensor]

An implementation of RESCAL from [nickel2011].

RESCAL models entities by \(d\)-dimensional vectors and relations by \(d \times d\)-dimensional matrices, both stored in Embedding. The RESCALInteraction function is used to obtain scores from them.

Note

For \(E\) entities and \(R\) relations, this model requires \(Ed + Rd^2\) parameters.

Initialize RESCAL.

Parameters:

See also

Attributes Summary

hpo_default

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

regularizer_default_kwargs

The LP settings used by [nickel2011] for for RESCAL

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

regularizer_default_kwargs: ClassVar[Mapping[str, Any]] = {'normalize': True, 'p': 2.0, 'weight': 10}

The LP settings used by [nickel2011] for for RESCAL