hatvis.metrics#

Structural statistics of hypergraphs.

Distributions, \(s\)-walk based connectivity (Aksoy et al. 2020), clustering, degree assortativity, nestedness and simpliciality (Landry, Young and Eikmeier 2024).

Distributions, s-walk connectivity, clustering coefficients, assortativity, nestedness, simpliciality.

Functions#

degree_distribution(H[, normalize])

Number (or fraction) of vertices of each degree.

size_distribution(H[, normalize])

Number (or fraction) of hyperedges of each size.

intersection_distribution(H)

Distribution of \(|e\cap f|\) over unordered pairs of distinct hyperedges with a common vertex.

s_connected_components(H[, s, edges])

The \(s\)-connected components.

is_s_connected(H[, s, edges])

s_distance(H, a, b[, s, edges])

Length of the shortest \(s\)-walk between two hyperedges (or vertices); inf if none.

s_distance_matrix(H[, s, edges])

All-pairs \(s\)-distances (inf for unreachable pairs).

s_diameter(H[, s, edges])

Largest finite \(s\)-distance (inf if the hypergraph is not \(s\)-connected).

s_component_profile(H[, s_values, edges])

How connectivity changes with \(s\): number of components, size of the largest one and diameter.

two_node_clustering(H)

Two-node clustering coefficient (Gallagher and Goldberg 2013).

clique_clustering(H)

Local clustering coefficient of the clique expansion (counts every hyperedge as a clique).

degree_assortativity(H[, kind, ...])

Degree assortativity of a hypergraph (after Chodrow 2020).

nestedness(H)

Inclusion statistics: how many hyperedges are proper subsets of another hyperedge.

simpliciality(H[, min_size, max_size])

Simpliciality measures of Landry, Young and Eikmeier (2024).

degree_entropy(H)

Shannon entropy (bits) of the degree distribution.

spectral_entropy(H)

von Neumann entropy of the normalized Laplacian, \(-\sum_k \lambda_k/n\,\log_2(\lambda_k/n)\), a basis-free measure of structural heterogeneity.