Currently DynamicHMCChain only contains in info what DynamicHMC calls tree_stats, but this is only a subset of the quantities that one might find useful for diagnosing sampling issues. In particular, DynamicHMC.MCMCSteps, which is stored in the meta field, also stores the current step size ϵ and the hamiltonian H. While it doesn't store the already-evaluated current value of the energy, this can be computed from H at minimal cost relative to that of generating a new trajectory.
Are warmup samples returned as well? If so, it would be good to have a boolean flag in the info so warmup samples can be distinguished from post-warmup samples.
So I propose that info be modified to a NamedTuple with entries step_size, energy, and tree_stats, where tree_stats points to an instance of TreeStatisticsNUTS. Or alternatively the structure is flattened to a single NamedTuple.
Currently
DynamicHMCChain
only contains ininfo
what DynamicHMC callstree_stats
, but this is only a subset of the quantities that one might find useful for diagnosing sampling issues. In particular,DynamicHMC.MCMCSteps
, which is stored in themeta
field, also stores the current step sizeϵ
and the hamiltonianH
. While it doesn't store the already-evaluated current value of the energy, this can be computed fromH
at minimal cost relative to that of generating a new trajectory.Are warmup samples returned as well? If so, it would be good to have a boolean flag in the
info
so warmup samples can be distinguished from post-warmup samples.So I propose that info be modified to a
NamedTuple
with entriesstep_size
,energy
, andtree_stats
, wheretree_stats
points to an instance ofTreeStatisticsNUTS
. Or alternatively the structure is flattened to a singleNamedTuple
.