PageRankAnchorSelection

class PageRankAnchorSelection(num_anchors=32, **kwargs)[source]

Bases: SingleSelection

Select entities according to their page rank.

Initialize the selection strategy.

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

  • kwargs – additional keyword-based parameters passed to page_rank().

Methods Summary

iter_extra_repr()

Extra components for __repr__.

rank(edge_index)

Rank nodes.

Methods Documentation

iter_extra_repr()[source]

Extra components for __repr__.

Return type

Iterable[str]

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.