Appendix B
Migrating from HAT-VIS, HyperGodot, and other packages
This appendix is for readers who know the MATLAB scripts of HAT-VIS, the HyperGodot viewer, or one of the Python packages HyperNetX, XGI, and Hypergraphx. It maps their functions and settings to hatvis and lists the chapter where each method is explained.
B.1 HAT-VIS
The HAT-VIS distribution [1] consists of MATLAB scripts that build a Hypergraph object of HAT [18] from an incidence matrix, reorder the matrix, compute the similarity of the vertices, embed it with cmdscale, and draw the hyperedges. Table B.1 gives the hatvis counterpart of every step. Two details matter when results are compared. The electric-car script embeds the dissimilarity of the transitive similarity (D=1-simOT), which is the default of layout_similarity; the mini example embeds the plain similarity (D=1-simO), which corresponds to transitive=False. The hyperedge trees of both scripts are minimum spanning trees on the dissimilarities of the plain similarity, as in draw_hatvis.
HAT-VIS (MATLAB) | hatvis | Chapter |
Hypergraph(’IM’, IM) | Hypergraph.from_incidence(IM) | |
HAT.uniformErdosRenyi(v, e, k) | models.uniform_random(n, m, k) | |
adjTensor, degreeTensor, laplacianTensor | adjacency_tensor, degree_tensor, laplacian_tensor | |
cliqueGraph, starGraph | clique_expansion, star_expansion | |
barycentric sorting loops, spy(IM(x,y)) | seriate(H, "barycentric"), plot_incidence(H) | |
simO (weighted Jaccard loop) | vertex_similarity(H) | |
simOT (max-product loop) | transitive_closure(S, "max-product"), vertex_similarity(H, transitive=True) | |
cmdscale(D, 2) | layout.classical_mds(D), layout_similarity(H) | |
MST of the members per hyperedge | draw_hatvis(H, mode="mst") | |
bounding ellipses, convex hulls | draw_hypergraph(H, style="ellipse"|"hull") | |
xlsread of the house of quality; A.*w | io.read_incidence_excel, qfd.qfd_hypergraph(R, importance), datasets.load_electric_car_qfd() |
B.2 HyperGodot
HyperGodot [2] is an interactive application; its settings correspond to arguments of the hatvis layout and drawing functions (table B.2). The input files are read and written unchanged, and to_html provides an interactive view in the browser with dragging, zooming, the vertex filter, group toggles, layout switching, adjustable padding and smoothness, and SVG export.
HyperGodot | hatvis | Chapter |
input file with #WEIGHT and #GROUP tags | io.read_hypergodot, io.write_hypergodot | |
force-directed layout (iterations, repulsion, spring length) | layout_force(H, iterations=500, repulsion=250, spring_length=30) | |
circular and radial layouts | layout_circular, layout_radial | |
convex-hull hyperedges with padding | draw_hypergraph(H, style="hull", pad, pad_step) | |
groups shown by line styles | draw_hypergraph(H, group="group") | |
line widths by weight | draw_hypergraph(H, width_by="weight") | |
vertex filter | draw_hypergraph(H, highlight=v) | |
interactive window, image export | to_html(H, path); Matplotlib savefig | |
comparison of system variants | temporal.difference, temporal.group_statistics |
B.3 HyperNetX, XGI, and Hypergraphx
The three Python packages are reached through converters and through the Hypergraph Interchange Format (section 2.3). Table B.3 lists the conversions and the hatvis functions that correspond to frequently used concepts of these packages; the names of the functions in the other packages change between versions, so the table refers to the concepts and the chapters rather than to their exact spelling.
Concept or object | hatvis | Chapter |
HyperNetX hypergraph | io.to_hypernetx(H), io.from_hypernetx(h) | |
XGI hypergraph | io.to_xgi(H), io.from_xgi(h) | |
Hypergraphx hypergraph | io.to_hypergraphx(H), io.from_hypergraphx(h) | |
HIF file (all three) | io.write_hif, io.read_hif | |
-line graphs, -components, -distance | s_line_graph, s_connected_components, s_distance | |
-betweenness, -closeness | s_betweenness, s_closeness, s_harmonic_closeness | |
clustering coefficients | metrics.two_node_clustering, metrics.clique_clustering | |
CEC, ZEC, HEC, node–edge centralities | clique_eigenvector, z_eigenvector, h_eigenvector, node_edge_eigenvector | |
motifs | motifs.h_motifs, motifs.node_motifs, motifs.motif_zscores | |
statistically validated hyperedges | patterns.validated_hyperedges | |
configuration model | models.configuration_model | |
simpliciality | simpliciality | |
drawing | draw_hypergraph, draw_hatvis, to_html |