
E-BFMI: energy Bayesian fraction of missing information
Source:R/HmcEnergyDiagnostic.R
bayesian_fmi.RdBetancourt's estimator of how well the momentum resampling of an HMC or
NUTS sampler explores the energy distribution,
\(\sum_{n \ge 1} (E_n - E_{n-1})^2 / \sum_n (E_n - \bar E)^2\); values
below 0.3 flag poor exploration. Identical to the Python arm
morie.fn.bfmi.bayesian_fmi.
Value
A list with bfmi, adequate (bfmi >= 0.3),
energy_var (divisor n - 1) and transition_var (mean squared
transition, divisor n - 1).
References
Betancourt, M. (2016). Diagnosing suboptimal cotangent disintegrations in Hamiltonian Monte Carlo. arXiv:1604.00695.
Examples
bayesian_fmi(c(1, 3, 2, 5, 4))$bfmi
#> [1] 1.5