MulticanonicalMCMCState#
- class graph_tool.inference.MulticanonicalMCMCState(entropy_args={})[source]#
Bases:
EntropyStateBase state that implements multicanonical MCMC sweeps.
Methods
Return the current default values for the parameters of the function
entropy(), together with other operations that depend on them.multicanonical_sweep(m_state[, multiflip])Perform
nitersweeps of a non-Markovian multicanonical sampling using the Wang-Landau algorithm.Reset the current default values for the parameters of the function
entropy(), together with other operations that depend on them.update_entropy_args(**kwargs)Update the default values for the parameters of the function
entropy()from the keyword arguments, in a stateful way, together with other operations that depend on them.- get_entropy_args()#
Return the current default values for the parameters of the function
entropy(), together with other operations that depend on them.
- multicanonical_sweep(m_state, multiflip=False, **kwargs)[source]#
Perform
nitersweeps of a non-Markovian multicanonical sampling using the Wang-Landau algorithm.- Parameters:
- m_state
MulticanonicalState MulticanonicalStateinstance containing the current state of the Wang-Landau run.- multiflip
bool(optional, default:False) If
True,multiflip_mcmc_sweep()will be used, otherwisemcmc_sweep().- **kwargsKeyword parameter list
The remaining parameters will be passed to
multiflip_mcmc_sweep()ormcmc_sweep().
- m_state
- Returns:
- dS
float Entropy difference after the sweeps.
- nattempts
int Number of vertex moves attempted.
- nmoves
int Number of vertices moved.
- dS
Notes
This algorithm has an \(O(E)\) complexity, where \(E\) is the number of edges (independent of the number of groups).
References
[wang-efficient-2001]Fugao Wang, D. P. Landau, “An efficient, multiple range random walk algorithm to calculate the density of states”, Phys. Rev. Lett. 86, 2050 (2001), DOI: 10.1103/PhysRevLett.86.2050 [sci-hub, @tor], arXiv: cond-mat/0011174