Metropolis-Hastings MH algorithm to simulate the Ising model for brain connectome.
This algorithm finds the critical temperature of the Human Connectome or any other network by inserting the connectivity matrix J.
This program requires a fast computer due to the iteration inside each Monte Carlo step.
To execute the algorithm, open main.m. It contains three functions:
- N_critical_T.m: This function find numerically an estimated value of the critical temperature (TC) in order to define a range of temperature for the algorithm.
- one_metropolis_step.m: This function correspond to one Metropolis step for flipping N spins selected randomly.
- visualization.m: This function is optional, it just visualizes the curve of Susceptibility vs Temperature.
Enter the next statement in Command Window of Matlab:
main
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.