Module Norn.Stats
Statistics of Hamiltonian transitions.
Each field holds one element per chain, with the axes of the chains it describes: a sampler's state holds [chain], and its draws [chain; draw].
#
type ('f, 'd) t = {- #
lp : (float, 'f, 'd) Nx.t;(*The log density at the transition's end.
*) - #
acceptance : (float, 'f, 'd) Nx.t; - #
step_size : (float, 'f, 'd) Nx.t;(*The step size the transition took.
*) - #
n_steps : 'd Nx.int32_t;(*The leapfrog steps it took.
*) - #
diverging : 'd Nx.bool_t;(*Whether the energy error exceeded 1000 or a position was not finite.
*) - #
saturated : 'd Nx.bool_t;(*Whether the trajectory reached its maximum length before it turned.
*) - #
energy : (float, 'f, 'd) Nx.t;(*The Hamiltonian after the momentum draw,
*)H0.
}The type for statistics of transitions over element type 'f.
#
val ptree : (float, 'f) Nx.dtype -> (('f, 'd) t, 'd) Nx.Ptree.tptree dtype is the structure of statistics at dtype, with tensors at lp, acceptance, step_size, n_steps, diverging, saturated and energy.