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:
- sndarrayof shape(N,M)orlistofVertexPropertyMaporVertexPropertyMap
- Time series or independent samples used for reconstruction. - If the type is - ndarray, it should correspond to a- (N,M)data matrix with- Msamples for all- Nnodes.- The values must correspond to Ising states: - -1or- +1- If the parameter - gis provided, this can be optionally a list of of- VertexPropertyMapobjects, where each entry in this list must be a- VertexPropertyMapwith type- vector<int>. If a single property map is given, then a single time series is assumed.- If the parameter - tbelow 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
 
- s
 - References [ising-model][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-2025]- Tiago P. Peixoto, “Network reconstruction via the minimum description length principle”, Phys. Rev. X 15, 011065 (2025) DOI: 10.1103/PhysRevX.15.011065 [sci-hub, @tor], arXiv: 2405.01015 [peixoto-scalable-2024]- Tiago P. Peixoto, “Scalable network reconstruction in subquadratic time”, arXiv: 2401.01404 [peixoto-uncertainty-2025]- Tiago P. Peixoto, “Uncertainty quantification and posterior sampling for network reconstruction” arXiv: 2503.07736 - Methods - get_dyn_state([s])- Return an - IsingGlauberStateinstance corresponding to the inferred model, optionally with initial state given by- s.- get_dyn_state(s=None)[source]#
- Return an - IsingGlauberStateinstance corresponding to the inferred model, optionally with initial state given by- s.