A collection of algorithms for inferring the history of random networks generated by the generalized preferential attachment model.
Pull requests are welcome.
python3
networkx >= 2.0
cmake
(to build the sampler)- SamplableSet
>= 2.0
(used for the SMC sampler)
The code is written in python
, but it interfaces with a number of executables written in C++
.
These should be compiled prior to using the package.
We provide a simple script compile.sh
that will compile everything.
-
example.py
is script that showcases how to use the code available in this repository. The functionconsistency_check.run(...)
carries out every step of the process automatically (network construction, obfuscation, inference, de-obfuscation, comparison). One simply needs to specify the generative model (generalized_gn
orgn
), its parameters (b
andgamma
, via adict
), and the inference technique to use (available:degree, OD, SMC
). -
tools/
contains python wrappers around all important parts of the software. These modules can be imported separately if only parts of the consistency check pipeline are needed. -
generator/
contains C++ code to generate networks from various growth models (many of which are not discussed in the paper below). A wrapper is available intools
.
Phase transition in the recoverability of network history
J.-G. Young, G. St-Onge, E. Laurence, C. Murphy, L. Hébert-Dufresne and P. Desrosiers
Phys. Rev. X, 9, 041056 (2019)
Journal link (open) | arXiv link
The code used to compute the automorphisms statistics of the generated networks is more or less all in this GitHub gist. It is a small wrapper around nauty's Dreadnaut.