This code accompanies the paper "A generative model for community types in directed networks" by Cathy Liu, Tristram J. Alexander, and Eduardo G. Altmann, arXiv:2405.14168 (2024).
The Tutorial.ipynb notebook shows how to use the model to reproduce community structures: Assortative, Core-Periphery, Disassortative and Source-Basin based on the classification we proposed in last paper "Non-assortative relationships between groups of nodes are common in complex networks".
The model is performed in two steps:
- Initialisation: Start with a an Erdős-Rényi directed graph with
$N$ nodes,$\frac{\langle z\rangle}{N-1}$ edge creation probability, and random group allocation of nodes. - Evolution:
- The notebook shows examples of data analysis:
- Tutorial.ipynb: exemplifies the process of implementing generative model.
- src: python files used to produce our result.
- Model.py includes the implementation of generative model
- User.py includes the node class that can perform rewiring/changing moves during network evolution process
- Statistics.py and summary_stats.py include the classification of community structures.