Code Monkey home page Code Monkey logo

network-generator's Introduction

Generate synthetic networks with Nested, Modular and In-block nested structures

Generate synthetic networks with predetermined nested, modular or in-block nested structure, with different levels of noise. This code employs a modification of the benchmark model introduced by Solé-Ribalta et al, PRE 2018 (https://doi.org/10.1103/PhysRevE.97.062302), in which one can networks with a fixed block size and increasing number of blocks, instead of networks with fixed size.

The parameters must be passed respecting the following order.

Inputs:

  1. rw = int: number of row nodes that form a block
  2. cl = int: number of col nodes that form a block
  3. B = float >= 1: number of blocks on which the main matrix will be divided
  4. xi = float >=1: shape parameter to indicate how stylized is the nested curve
  5. P = in [0, 1] value of the parameter that control the amount of noise outside a perfect nested
  6. mu = in [0, 1] value of the parameter that control the amount of noise outside the blocks

Output:

  1. The function return each generated network in matrix format in a .csv file with the word prefix "edges".

If the number of columns nodes is not given, the function will assume that we want to generate a unipartite networks.

Example:

python3 generate_synthetic_networks.py 20 30 2 2.2 0.1 0.1

Example 2:

If you want to generate several networks with varying values of a parameter. To generate networks for different parameters reproduce the following bash example in a nested loop

for B in $(seq 1 0.5 5); do
   python generate_synthetic_networks.py 20 30 $B 2 0.1 0.1 &
done

Where in this example the parameter B is scanned from 1 to 5 with 0.5 increments

Citations

A. Solé-Ribalta, CJ. Tessone, M S. Mariani, and J Borge-Holthoefer. Revealing in-block nestedness: Detection and benchmarking, Phys. Rev. E 97, 062302 (2018). DOI: 10.1103/PhysRevE.97.062302

MJ Palazzi, J Borge-Holthoefer, CJ Tessone and A Solé-Ribalta. Macro- and mesoscale pattern interdependencies in complex networks. J. R. Soc. Interface, 16, 159, 20190553 (2019). DOI: 10.1098/rsif.2019.0553

network-generator's People

Contributors

mariapalazzi avatar quinteroqca avatar

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.