Calculate distance between graphs. The following distances are supported:
| Distance | Description |
|---|---|
| spectral | This is the original python sunbeam distance |
| wasserstein_kde_dist | Wasserstein distance between estimated distributions of nonbacktracking eigenvalues |
| distance_gr_wass | Gromov-Wasserstein distance between nonbacktracking eigenvalue vectors |
Python version >= 3.5
- Run on your local machine
- Clone this repository on your local machine.
git clone https://github.com/liubaoryol/graph_distance.git - Install requirements:
pip install -r requirements.txt - Open a terminal with the path where you cloned this repository
C:Users/desktop/graph_distance$ python - Import
neuro_umapfunctions as follows
>>> from neuro_umap import nbeigs_calculate, distance_gr_wass
- Example:
>>> eigs=nbeigs_calculate(graphs,'2D') >>> distance_gr_wass(eigs) - Clone this repository on your local machine.
Motivated on the following articles:
-
Torres, L., Suárez-Serrato, P. & Eliassi-Rad, T.
Non-backtracking Cycles: Length Spectrum Theory and Graph Mining Applications,
Appl Netw Sci 4, 41 (2019) -
Achard, S., Delon-Martin, C., et al.,
Hubs of brain functional networks are radically reorganized in comatose patients,
PNAS 109, 50 (2012)