AutoSF
- class AutoSF(embedding_dim: int = 256, num_components: int = 4, coefficients: Sequence[tuple[int, int, int, Literal[-1, 1]]] = [(0, 0, 0, 1), (1, 1, 1, 1), (2, 2, 2, 1), (3, 3, 3, 1), (1, 2, 3, -1), (3, 1, 1, -1)], embedding_kwargs: Mapping[str, Any] | None = None, **kwargs)[source]
Bases:
ERModel
An implementation of AutoSF from [zhang2020].
The AutoSF model combines one or more
pykeen.nn.Embedding`s for entities and relations with a :class:`pykeen.nn.AutoSFInteraction
describing the interaction thereof.Initialize AutoSF via the
pykeen.nn.AutoSFInteraction
interaction.Note
this variant uses num_components entity and relation representations with shared configuration. The coefficients should only be in \([0, num_components)\).
- Parameters:
embedding_dim (int) – the entity embedding dimension \(d\) for each block.
num_components (int) – the number of components/blocks.
coefficients (Sequence[tuple[int, int, int, Literal[-1, 1]]]) – the coefficients determining the block structure, cf.
pykeen.nn.AutoSFInteraction
.embedding_kwargs (Mapping[str, Any] | None) – keyword arguments passed to the entity and relation representation
kwargs – remaining keyword arguments passed through to
pykeen.models.ERModel
.
Attributes Summary
The default strategy for optimizing the model's hyper-parameters
Attributes Documentation