RandomAnchorSelection

class RandomAnchorSelection(num_anchors=32, random_seed=None)[source]

Bases: SingleSelection

Random node selection.

Initialize the selection stragegy.

Parameters:
  • num_anchors (int) – the number of anchors to select

  • random_seed (Optional[int]) – the random seed to use.

Methods Summary

rank(edge_index)

Rank nodes.

Methods Documentation

rank(edge_index)[source]

Rank nodes.

Parameters:

edge_index (ndarray) – shape: (m, 2) the edge_index, i.e., adjacency list.

Return type:

ndarray

Returns:

(n,) the node IDs sorted decreasingly by anchor selection preference.