Spreading dynamic with community structure

858 Views Asked by At

I have a data set which I hope to simulate the spreading dynamic with community structure. The steps I follow is

  1. import the data to a complex network with Networkx
  2. partition the network into some modules which are known as communities
  3. simulate the SIS model and draw plots with and without communities.

Something confused me between step 2 and step 3. After partitioning, I get some communities which contains nodes number. The community numbers and nodes numbers are the only input to step 3, and how I simulate SIS with and without communities?

1

There are 1 best solutions below

2
On

I'm answering your last question in the comments of your original post. It corresponds to 2 different tasks: 1) artificially generating some networks (with or without a community structure) and 2) applying SIS.

In Networkx, there are many generative models, listed on this page. However I can't see any model to generate community-structured networks. You could use the C++ program by Lancichinetti, which implements a very widespread model.

Regarding the application of SIS, you could consider Netpidemix, which uses Networkx for the network part of the process. Alternatively, the igraph library also contains generative models and epidemics-related models (such as SIR)