hamiltonian monto carlo principles details
- The HMC sampling procedure alternates between sampling the Gaussian momenta and letting the position of the particle evolve by integrating its Hamiltonian equations of motion. In most models, the latter cannot be integrated exactly, so the resulting position is used as a Metropo- lis proposal, with an acceptance probability that depends exponentially on the energy gained due to the numerical error.
Several properties of Hamiltonian dynamics are crucial to its use in constructing Markov chain Monte Carlo updates.
the acceptance probability is one if H kept invariant
For example, in a regression model with many predictor variables, the regression coefficients might be given Gaussian prior distributions, with mean of zero and a variance that is a hyperparameter. This hyperparameter could be given a broad prior distribution, so that its posterior distribution is determined mostly by the data.
leap frog method 分为三步，第一步和第三步是对称的，所以是reversible .
Too short trajectories will cause a failure to suppress random walks and too long trajectories will be wasteful of computation
This can usually be done with some experimentation, e.g., by monitoring the auto covariance function for parameters and increasing L until roughly independent samples are obtained