IsingBlockStateBase

IsingBlockStateBase#

class graph_tool.inference.IsingBlockStateBase(s, g=None, has_zero=False, **kwargs)[source]#

Bases: ABC

Base state for network reconstruction based on the Ising model, using the stochastic block model as a prior.

This class is not supposed to be instantiated directly.

Instead one of its specialized subclasses must be used, which have the same signature: IsingGlauberBlockState, PseudoIsingBlockState, CIsingGlauberBlockState, PseudoCIsingBlockState.

Parameters:
sndarray of shape (N,M) or list of VertexPropertyMap or VertexPropertyMap

Time series or independent samples used for reconstruction.

If the type is ndarray, it should correspond to a (N,M) data matrix with M samples for all N nodes.

The values must correspond to Ising states: -1 or +1

If the parameter g is provided, this can be optionally a list of of VertexPropertyMap objects, where each entry in this list must be a VertexPropertyMap with type vector<int>. If a single property map is given, then a single time series is assumed.

If the parameter t below is given, each property map value for a given node should contain only the states for the same points in time given by that parameter.

gGraph (optional, default: None)

Initial graph state. If not provided, an empty graph will be assumed.

has_zerobool (optional, default: False)

If True, the three-state “Ising” model with values {-1,0,1} is used.

**kwargs(optional)

Remaining parameters to be passed to DynamicsBlockStateBase

References

[peixoto-network-2019]

Tiago P. Peixoto, “Network reconstruction and community detection from dynamics”, Phys. Rev. Lett. 123 128301 (2019), DOI: 10.1103/PhysRevLett.123.128301 [sci-hub, @tor], arXiv: 1903.10833

[peixoto-network-2024]

Tiago P. Peixoto, “Network reconstruction via the minimum description length principle”, arXiv: 2405.01015

[peixoto-scalable-2024]

Tiago P. Peixoto, “Scalable network reconstruction in subquadratic time”, arXiv: 2401.01404

Methods

get_dyn_state([s])

Return an IsingGlauberState instance corresponding to the inferred model, optionally with initial state given by s.

get_dyn_state(s=None)[source]#

Return an IsingGlauberState instance corresponding to the inferred model, optionally with initial state given by s.