State¶
State objects are used to store the current state of the Markov chain. States are subclassed from collections.OrderedDict so that the elements are in a known order.
-
class
state.
State
¶ State object for storing parameter values.
Inherits from OrderedDict.
-
freeze
()¶ Return a immutable tuple of the state values.
-
static
fromfunc
(func)¶ Initialize a State from the arguments of a function
-
fromvector
(vec)¶ Update the state using a numpy array.
Parameters: vec – np.array for updating the state.
-
tovector
()¶ Return the parameter values as a flat vector.
-