Skip to main content

Module algorithms

Module algorithms 

Source
Expand description

Hypergraph algorithms.

Implements:

  • Spectral clustering via the normalised Laplacian (Zhou et al. 2006).
  • Hyperedge cuts: raw cut, ratio cut, normalised cut.
  • Generalised random walk (Markov chain on nodes through hyperedges).
  • Hypergraph betweenness centrality based on shortest paths through the clique-expansion graph.
  • s-walks and s-paths: walks/paths between hyperedges that share ≥ s nodes.

Structs§

CutResult
Result of a hyperedge cut computation.
SpectralClusteringResult
Result of hypergraph spectral clustering.

Functions§

betweenness_centrality
Compute hypergraph betweenness centrality for every node.
hyperedge_cut
Compute the hyperedge cut, ratio cut, and normalised cut for a binary partition of the node set.
s_betweenness_centrality
Hyperedge betweenness centrality in the s-line graph.
s_diameter
Compute the s-diameter of the hypergraph: the maximum s-distance over all pairs of hyperedges in the same s-connected component.
s_distance
Compute the s-distance between two hyperedges: the length of the shortest s-path (sequence of hyperedges each sharing ≥ s nodes with the next).
s_reachability
Enumerate all s-paths of length ≤ max_len starting from hyperedge start as BFS layers.
spectral_clustering
Perform spectral clustering on a hypergraph using the normalised Laplacian (Zhou et al. NeurIPS 2006).
stationary_distribution
Compute the stationary distribution of the generalised random walk on a hypergraph, using power iteration on the transition matrix.