Variable
Variable describes a finite discrete probabilistic variable, optionally owned
by a graph node.
See Belief Propagation for domain, state,
prior, evidence, and posterior behavior.
Reference
tonggraph.Variable
Finite discrete probabilistic variable attached to an optional graph node.
id
property
Internal integer variable ID.
owner_id
property
Owning graph node ID, if the variable is attached to a node.
domain
property
Variable domain, commonly "binary" or "categorical".
states
property
Ordered state labels used by priors, CPDs, factors, and posteriors.
prior
property
prior: dict[str, PropertyValue]
Prior distribution metadata.
posterior
property
posterior: dict[str, PropertyValue]
Persisted posterior metadata stored with the variable record.