This repository accompanies the article "Reconstructing networks from simple and complex contagions" by Nicholas Landry, Will Thompson, Laurent Hébert-Dufresne, and Jean-Gabriel Young.
Data
folder contains all of the data corresponding to the figures in the manuscript.Figures
folder contains PDF and PNG files for each of the figures in the paper.tests
folder contains unit tests to validate the code written for generating our results.lcs
(Learning Complex Structure) folder contains all of the code necessary for the generation of time series, the generation of random networks, the inference of networks, and the measurement of reconstruction performance.Extra
folder contains scripts and notebooks which are not used in the manuscript.convergence
folder contains notebooks used for heuristically determining what the values for burn-in and sampling gap should be for our MCMC sampler.lcs
(Learning complex structure) when accessing the functionality.plot_fig#.py
generates all of the figures displayed in the manuscript.clustered_network.py
cm.py
erdos_renyi.py
sbm.py
watts-strogatz.py
collect_clustered_network.py
collect_cm.py
collect_erdos_renyi.py
collect_sbm.py
collect_watts-strogatz.py
zkc_*.py
generates the data used in Figs. 1 and 3.collect_tmax_comparison.py
collect the data generated vs. tmax and measures the nodal performance displayed in Fig. 3.collect_zkc_infer_vs_tmax.py
and collect_zkc_frac_vs_beta
collect this data and measure the performance of the reconstructions for Figs. 1(c) and 1(d) respectively.run_dynamical_inference.ipynb
runs a single inference for a single network and time series.