THRML

Graphical model components

Nodes are the variables of a graphical model. A node carries the type and shape of one site's state.

AbstractNodeclass
AbstractNode()

A node in a PGM.

Every node used in a PGM must inherit from this class. When compiling a program, each node is assigned a shape and datatype that are used to organize the state of the sampling program in a jax-friendly way.

SpinNodeclass
SpinNode()

A node that represents a random variable that takes on a state in {-1, 1}.

CategoricalNodeclass
CategoricalNode()

A node that represents a random variable that may take on any one of K possible discrete states, represented by a positive integer in (0, K].