inferlo.testing.ising_model_on_graph
- inferlo.testing.ising_model_on_graph(graph: Graph, field_range=0.1, interaction_range=0.1, seed=0) PairWiseFiniteModel [source]
Builds random Ising model on given graph.
- Parameters:
graph – Graph for the model. Vertices are variables, nodes are interactions.
field_range – Fields will be sampled uniformly from
[-field_range, field_range]
.interaction_range – Interactions will be sampled uniformly from
[-interaction_range, interaction_range]
.seed – Random seed.
- Returns:
Generated model.