Download all codes in the same folder.
Prepare a temporal network data as a CSV file. The format is described in the beginning of into-snapshots.py
python3 into-snapshots.py infilename resolution ID_offset
The infilename should not contain '.csv'.
'resolution' and 'ID_offset' are optional.
See the beginning of into-snapshots.py for more details.
This will create snapshots adj1.csv, adj2.csv, ...
Set dir_data in preprocess_state_dyn.m to the folder you have all codes and data.
Download dunns.m in the same folder.
Run in MATLAB
where if_normalize = 1, 2, 3, or 4 and corresponds to different Laplacian spectral distance measures.
The results are shown as a figure. The state dynamics are output on the command line (which you can save by slightly modifying code).
Alternatively, if DELTACON is used as the distance measure, download MATLAB code for DELTACON in the same folder and run
Alternatively, if the Jensen-Shannon divergence is used as the distance measure, run
where beta is a parameter. In our paper, beta = 0.1, 1, and 10 are used.