This code is for the calculation of maximum entropy null models for networks with empirically known clusters.
For networks with known partitions, the configuration model can be used with explicitly modelling these partitions. This code analytically solves the configuration model within and between all clusters - all 'blocks' in the adjacency matrix.
The details and performance of this method can be found in this open-access paper.

The code for the analytically solved null models, the Directed Configuration Model and the Reciprocated Configuration Model, is provided in a jupyter notebook (for now) running on Python 3.5. This notebook contains all explanations about the method, the functions and working examples to show how to use the code.
The provided jupyter notebook is written to be self-explanatory and self-contained. Once the provided functions in the notebook are loaded, running the algorithm for a given degree sequence or observed network follows:
- Loading a network/graph, as the corresponding adjacency matrix in
numpy.arrayformat
- Specify the partitioning of the graph into the block structure
planted_partition = np.concatenate([np.zeros(shape=10), np.ones(shape=8)]) - Running the null model solution
probability_adjacency = numerically_solve_block_dcm(adjacency_matrix=adjacency, partitioning=planted_partition)- The null model probabilities can be visualised
Please see the jupyter notebook for more details and examples.
MIT © Jeroen van Lidth de Jeude - IMT School For Advanced Studies Lucca
"Reconstructing mesoscale network structures" Jeroen van Lidth de Jeude, Tiziano Squartini, Fabio Saracco, Riccardo Di Clemente, Guido Caldarelli, 15 May 2018



