TuringLang / AdvancedHMC.jl

Robust, modular and efficient implementation of advanced Hamiltonian Monte Carlo algorithms
https://turinglang.org/AdvancedHMC.jl/
MIT License
237 stars 41 forks source link

Partial momentum refreshment missing sqrt() #280

Closed rhaps0dy closed 3 years ago

rhaps0dy commented 3 years ago

In partial momentum refreshment, we add a Gaussian random variable to the momentum. From Neal's 2012 Handbook, eq. 5.19 ( https://arxiv.org/pdf/1206.1901.pdf#subsection.1.5.3 )

r' = α⋅r + sqrt(1-α²)⋅G

where r is the momentum and G is a Gaussian RV.

The expression in AdvancedHMC is missing the sqrt: https://github.com/TuringLang/AdvancedHMC.jl/blob/master/src/hamiltonian.jl#L183

yebai commented 3 years ago

nice catch - thanks @rhaps0dy!