AutoSF

class AutoSF(embedding_dim=256, num_components=4, coefficients=[(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=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 (Optional[Mapping[str, Any]]) – keyword arguments passed to the entity and relation representation

  • kwargs – remaining keyword arguments passed through to pykeen.models.ERModel.

Attributes Summary

hpo_default

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

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