pints
pints copied to clipboard
Store energies for HMC samplers
It seems quite established to compare the distribution of energy transition to the overall energy distribution in a chain to determine whether the momenta / mass matrix where chosen appropriately for a problem, see https://arxiv.org/pdf/1701.02434.pdf towards the end or https://arviz-devs.github.io/arviz/examples/plot_energy.html.
The intuition is that the energy differences between iterations E_n - E_{n-1} should be similarly distributed as the mean centered energies in the chain for good exploration E_n - mean(E).
At the moment I don't think we have any way to access the energies of a HMC run do we (because the momenta are thrown out?). My suggestion therefore is to also store the energies in addition to the log-posterior scores for HMC samplers.
It's a good idea but, in my experience, not many people use this metric. Because of this, there aren't really well-established benchmarks for what is a reasonable BFMI versus what's not. So, I'd vote to keep it out...