hatvis.seriation#

Seriation of the incidence matrix.

A well-ordered incidence matrix is one of the most faithful hypergraph visualizations: every vertex is a row, every hyperedge a column, nothing is lost, and with a good order groups of vertices that share groups of hyperedges appear as dense blocks (biclusters). The iterative scheme of the HAT-VIS scripts, used also by Nagy et al. (2022) for manufacturing spaces, moves every row to the mean position of its co-occurring rows; it is a form of reciprocal averaging, whose fixed point is the first axis of correspondence analysis (Hill 1974).

Barycentric, correspondence and hierarchical seriation; biclusters of the incidence matrix.

Functions#

barycentric_order(X[, n_iter, axis])

Iterative barycentric order of the rows (axis=0) or columns (axis=1) of a matrix.

correspondence_order(X)

Row and column orders from the first axis of correspondence analysis.

hierarchical_order(X[, metric, method, ...])

Leaf order of a hierarchical clustering of the rows (or columns), optionally with optimal leaf ordering.

seriate(H[, method, weighted, n_iter])

Row (vertex) and column (hyperedge) orders of the incidence matrix.

seriation_quality(H[, rows, cols])

Compactness of an ordered incidence matrix.

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

Biclusters of the incidence matrix by spectral co-clustering.