Coder Social home page Coder Social logo

gdelfe / belief_propagation-message_passing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

Static Belief Propagation - Message Passing algorithms for the computation of the magnetization and correlation, at any temperature, in both the spin-glass and ferromagnetic Ising model

C 100.00%
belief-propagation dynamical-mean-field-theory dynamical-systems message-passing neural-dynamics spin-dynamics

belief_propagation-message_passing's Introduction

belief-propagation-message-passing

This repo contains the codes to compute the magnetization at a given temperature for a Ising spin model on a Erdős–Rényi random graph (ERRG) via message-passing (belief-propagatation/cavity method).
Results are then compared with the magnetization obtained via Monte Carlo simulations.

Some reference to the methods used:

The algorithm is known as "cavity method" in the physics community and "message-passing" or "belief-propagation" in the computer science community.

  1. Cavity Method: Message Passing from a Physics Perspective
    Gino Del Ferraro, Chuang Wang, Dani Martí, Marc Mézard
  2. Equilibrium and dynamics on complex networks
    Gino Del Ferraro - (Chapter 2. - see ref. therein)

To run the code:

  1. Generate a Erdos Renyi random graph with Generate_ERRG_deg.c, follow the instruction at the top of the code, comment section
  2. Run static_BP.c (follow the instruction at the top part of the code) to compute the magnetization of an Ising model with arbitrary connectivity as a function of the temperature.
  3. If you only want to run the code in 2. for one given temeperature, you can run static_BP_single_beta.c

All the codes run for a given instance of the ERRG Ising model. If you want to get results for multiple realization of the ERRG you will have to average the results over different run, each made on a different ERRG.

Please cite this work if you use any of these codes:

Del Ferraro, G. (2016). Equilibrium and Dynamics on Complex Networkds. PhD dissertation, KTH Royal Institute of Technology.

Del Ferraro, G., Wang, C., Martí, D., & Mézard, M. (2014). Cavity method: Message passing from a physics perspective. arXiv preprint arXiv:1409.3048.

belief_propagation-message_passing's People

Contributors

gdelfe avatar

Watchers

 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.