MixtureAnchorSelection
- class MixtureAnchorSelection(selections: Sequence[str | AnchorSelection | type[AnchorSelection] | None], ratios: None | float | Sequence[float] = None, selections_kwargs: Mapping[str, Any] | None | Sequence[Mapping[str, Any] | None] = None, **kwargs)[source]
Bases:
AnchorSelection
A weighted mixture of different anchor selection strategies.
Initialize the selection strategy.
- Parameters:
selections (Sequence[str | AnchorSelection | type[AnchorSelection] | None]) – the individual selections. For the sake of selecting unique anchors, selections will be executed in the given order eg, [‘degree’, ‘pagerank’] will be executed differently from [‘pagerank’, ‘degree’]
ratios (None | float | Sequence[float]) – the ratios, cf. normalize_ratios. None means uniform ratios
selections_kwargs (Mapping[str, Any] | None | Sequence[Mapping[str, Any] | None]) – additional keyword-based arguments for the individual selection strategies
kwargs – additional keyword-based arguments passed to AnchorSelection.__init__, in particular, the total number of anchors.
Methods Summary
__call__
(edge_index[, known_anchors])Select anchor nodes.
Extra components for __repr__.
Methods Documentation