This repository contains code related to the paper Hypergraph Co-Optimal Transport: Metric and Categorical Properties
by Samir Chowdhury, Tom Needham, Ethan Semrad, Bei Wang, and Youjia Zhou.
To get started, we suggest creating a new conda environment. From the terminal window, type in:
conda create -n HyperCOT python=3.9
conda activate HyperCOT
Next, please install the dependencies from the provided requirements.txt
file.
pip install -r requirements.txt
The main dependencies for our package are:
- Python Optimal Transport (https://pythonot.github.io/)
- HyperNetX (https://github.com/pnnl/HyperNetX)
Additionally, we utilize code from:
- Redko, Vayer, Flamary, Courty (2020), CO-Optimal Transport
- Zhou, Rathore, Purvine, Wang (2021), Topological Simplifications of Hypergraphs
- Do, Yoon, Hooi, Shin (2020), Structural Patterns and Generative Models of Real-world Hypergraphs
- code to compute HyperCOT distances
- demo notebook to perform multiscale matching (requires
plotly
) as below:
- Try running the
run_simulated.ipynb
notebook. Here we load a dataset of 40 simulated hypergraphs and show how to compute HyperCOT distances for a pair of hypergraphs. Although we do not go through the full computation in the notebook, computing all the pairwise distances should yield a matrix as follows (plotted usingseaborn
):
To generate hypergraphs of the form in the header, please visit https://github.com/tdavislab/Hypergraph-Vis.