WeisfeilerLehmanInitializer
- class WeisfeilerLehmanInitializer(*, color_initializer: str | Callable[[Tensor], Tensor] | None = None, color_initializer_kwargs: Mapping[str, Any] | None = None, shape: int | Sequence[int] = 32, edge_index: Tensor | None = None, num_entities: int | None = None, mapped_triples: Tensor | None = None, triples_factory: CoreTriplesFactory | None = None, **kwargs)[source]
Bases:
PretrainedInitializer
An initializer based on an encoding of categorical colors from the Weisfeiler-Lehman algorithm.
Initialize the initializer.
- Parameters:
color_initializer (str | Callable[[Tensor], Tensor] | None) – the initializer for initialization color representations, or a hint thereof
color_initializer_kwargs (Mapping[str, Any] | None) – additional keyword-based parameters for the color initializer
shape (int | Sequence[int]) – the shape to use for the color representations
edge_index (Tensor | None) – shape: (2, m) the edge index
num_entities (int | None) – the number of entities. can be inferred
mapped_triples (Tensor | None) – shape: (m, 3) the Id-based triples
triples_factory (CoreTriplesFactory | None) – the triples factory
kwargs – additional keyword-based parameters passed to
pykeen.utils.iter_weisfeiler_lehman()