graph_tool.inference.MulticanonicalMCMCState#

class graph_tool.inference.MulticanonicalMCMCState[source]#

Bases: ABC

Base state that implements multicanonical MCMC sweeps

Methods

multicanonical_sweep(m_state[, multiflip])

Perform niter sweeps of a non-Markovian multicanonical sampling using the Wang-Landau algorithm.

multicanonical_sweep(m_state, multiflip=False, **kwargs)[source]#

Perform niter sweeps of a non-Markovian multicanonical sampling using the Wang-Landau algorithm.

Parameters:
m_stateMulticanonicalState

MulticanonicalState instance containing the current state of the Wang-Landau run.

multiflipbool (optional, default: False)

If True, multiflip_mcmc_sweep() will be used, otherwise mcmc_sweep().

**kwargsKeyword parameter list

The remaining parameters will be passed to multiflip_mcmc_sweep() or mcmc_sweep().

Returns:
dSfloat

Entropy difference after the sweeps.

nattemptsint

Number of vertex moves attempted.

nmovesint

Number of vertices moved.

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