GithubHelp home page GithubHelp logo

diffusion_speed's Introduction

diffusion_speed

This repository hosts the code to reproduce results of the following paper:

H. Peng, A. Nematzadeh, D.M. Romero, E. Ferrara
Network Modularity Controls the Speed of Information Diffusion
Physical Review E 102, 052316 (2020)

File organization

  • To produce Fig. 1 and Fig. 2 in the paper, first run sbm_simulation.ipynb and sbm_analytical.ipynb, and then run the first two parts of figures_1_2_3.ipynb. The two figures are relatively easy and quick to produce, therfore you do not need a hpc server for this process.

  • To produce the two phase diagrams in Fig. 3, run the last part in figures_1_2_3.ipynb; it will point you to first run sbm_fix_thsh_hpc (for Fig. 3a) and run sbm_fix_rho0_hpc (for Fig. 3b) to generate the data. Note that the script in sbm_fix_rho0_hpc creats a file that stores only the final size and time information, whereas the script in sbm_fix_thsh_hpc stores per time step data that will be reused in Fig. 5a.

  • To produce Fig. 4a, run lfr_simulation.ipynb (it will point you to run lfr_hpc first); to produce Fig. 4b, run twitter_simulation.ipynb (it will point you to run twitter_hpc first). Both "hpc" scripts will save the per time step data that will be reused to produce Fig. 5b and Fig. 5c.

  • Run scripts in the folder speed_fix_size to produce Fig. 5.

  • The command I used to run all hpc scirpts is: sbatch xyz.slurm. Each phase diagram script (hpc) utilizes 51 computer nodes to simultaneously generate 1/51 slice of the data.

  • I didn't share all the simulation data generated in the pickle format because each of them has a file size larger than 500 MB, which exceeds the size limit set by Github.

diffusion_speed's People

Contributors

haoopeng avatar

Watchers

James Cloos avatar  avatar  avatar

diffusion_speed's Issues

Some requestions

Hello, thank you very much for your research on this research topic. I've been reading your paper recently. In the process of reproducing the results of the paper, I have some questions. First of all, I want to ask you, such as in LFR_ hpc.py File, will generate 50 documents, and then how to analyze these 50 documents, and then generate the final data for drawing, SBM, LFR and twitter networks have this problem. Secondly, because of the limitation of my computer configuration, it takes me seven or eight hours to run a cycle in a code. If it's convenient, I hope you can send the following four documents to my mailbox.
e-mail address: [email protected]
1、phase_ simu_ twitter_ thsh_ 0.3_ F_ 0.01.pickle
2、partition_ twitter.pickle
3、phase_ simu_ nodes_ 100k_ Z_ 10_ thsh_ 0.3_ F_ 0.01.pickle(For FLR network)
4、phase_ simu_ nodes_ 100k_ Z_ 10_ thsh_ 0.35_ F_ 0.01.pickle(For SBM network)
Finally, thank you again for your help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.