TuringLang / AdvancedHMC.jl

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

feat: support position-dependent kinetic #369

Closed xukai92 closed 1 month ago

xukai92 commented 1 month ago

extend the interface with position-independent fallback as default

yebai commented 1 month ago

Thanks @xukai92 -- it looks good to me.

@mhauru, you might want to take a look at this PR, too, since it is one of the most important packages in TuringLang. The changes in this PR are to prepare several follow-up PRs that implement Riemannian manifold HMC.

xukai92 commented 1 month ago

I accepted your suggestions. do you want to merge this PR then?

yebai commented 1 month ago

Some tests seem to be failing. Can you take a look?

Also, feel free to open multiple PRs in parallel. We’d like to get at least two reviews before merging.

yebai commented 1 month ago

Do I understand correctly that θ are the "position" parameters and r are the corresponding canonical momentum, and the idea here is to extend the interface so that the metric could depend on θ, although that is still unimplemented?

Yes, that is correct.

We can gradually address your other comments in future PRs.