hatvis.community#

Community detection and clustering of hypergraphs.

  • hypergraph modularity (strict / all-or-nothing form of Kamiński et al. 2019 and Chodrow, Veldt and Benson 2021) and the graph modularity of projections;

  • a Louvain-type local-moving and aggregation heuristic that maximizes the hypergraph modularity directly;

  • Louvain on the clique expansion or on the line graph (as in Nagy et al. 2022);

  • label propagation on the vertex–hyperedge incidence structure;

  • spectral co-clustering of the incidence matrix (simultaneous clusters of vertices and hyperedges, Dhillon 2001).

Strict hypergraph modularity, hypergraph Louvain, Louvain on projections, label propagation, co-clustering.

Functions#

modularity(H, partition[, resolution])

Strict (all-or-nothing) hypergraph modularity.

graph_modularity(H, partition[, projection, ...])

Newman–Girvan modularity of a projection (clique expansion of the vertices).

hypergraph_louvain(H[, resolution, init, ...])

Maximize the strict hypergraph modularity (modularity()) by local moving and merging.

louvain(H[, target, weighting, resolution, ...])

Louvain communities of a projection (networkx implementation).

label_propagation(H[, max_iter, random_state])

Label propagation through the incidence structure (after Raghavan et al. 2007).

spectral_coclustering(H, n_clusters[, ...])

Simultaneous clustering of vertices and hyperedges (spectral co-clustering, Dhillon 2001).

partition_sizes(partition)

Number of members per community, largest first.

communities(partition)

Partition as a list of member lists (community 0 first).