Skip to content

jeroenvldj/maximum_entropy_block_models

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

   Python License

Configuration model for networks with block structures

This code is for the calculation of maximum entropy null models for networks with empirically known clusters.

Method

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.

Paper - full details on the method

The details and performance of this method can be found in this open-access paper. paper

Code

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.

Example - Running 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:

  1. Loading a network/graph, as the corresponding adjacency matrix in numpy.array format

  1. Specify the partitioning of the graph into the block structure
planted_partition = np.concatenate([np.zeros(shape=10), np.ones(shape=8)]) 
  1. Running the null model solution
probability_adjacency = numerically_solve_block_dcm(adjacency_matrix=adjacency, partitioning=planted_partition)
  1. The null model probabilities can be visualised

Notes

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

About

Maximum entropy (configuration model) network null models for block structures

Resources

License

Stars

5 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors