Skip to content
/ ndm Public

Generalized Network Diffusion Model — a physics-inspired framework to model diffusion on complex networks and analyze its informational and thermodynamic structure.

License

Notifications You must be signed in to change notification settings

CoMuNeLab/ndm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NDM

This generalized Network Diffusion Model code provides a physics-inspired framework to analyze how perturbations or information spread across a network, under either continuous or discrete dynamics. It’s used in contexts like:

  • diffusion of signals or diseases,

  • entropy-based centrality and influence measures,

  • community detection and network comparison,

  • and recently, network thermodynamics.

You need to choose a network (g) and a control operator (H)

I have built the control operators for continuous diffusion and discrete random walks as examples

You can plug in the Jacobian instead of Laplacian--- and make it a new function.

two small example of usage, more are found in the example directory:

first with continuos

import ndm
import networkx as nx

g = nx.erdos_renyi_graph(30,.2)
H = ndm.diffusion_operator_continuous(g)
tau = 3
rho , S , Z , F = ndm.network_thermodynamics(H, tau, continuous = True)

Second discrete

import ndm
import networkx as nx

g = nx.erdos_renyi_graph(30,.2)
H = ndm.diffusion_operator_discrete(g)
tau = 3
rho , S , Z = ndm.network_thermodynamics(H, tau, continuous = False)

Project Structure

This is the repository tree:

├── example
│   ├── animate_rho.py
│   ├── example_continuous.py
│   ├── example_discrete.py
│   ├── plot_density_matrix.py
│   └── plot_diffusion.py
├── LICENSE
├── pyproject.toml
├── README.md
└── src
    └── ndm
        ├── generalizedNDM.py
        ├── __init__.py
        ├── operators.py
        ├── propagators.py
        └── thermodynamics.py

About

Generalized Network Diffusion Model — a physics-inspired framework to model diffusion on complex networks and analyze its informational and thermodynamic structure.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages