blackjax-devs / blackjax

BlackJAX is a Bayesian Inference library designed for ease of use, speed and modularity.
https://blackjax-devs.github.io/blackjax/
Apache License 2.0
806 stars 105 forks source link

Refactor proposal.py #599

Closed junpenglao closed 10 months ago

junpenglao commented 10 months ago

proposal.py was initially designed for HMC/NUTS, thus the API and documentation (e.g., the Proposal object) are using HMC terminology. When other MCMC algorithm like random_walk is calling the function in proposal.py, it needs to overload some of the arguments and thus becoming hard to read. We should refactor proposal so that it provides a general sampling scheme, and additional wrapper on top so HMC could use it easier.

junpenglao commented 10 months ago

A related issue is that, the design pattern in proposal makes other places need to do overloading: nonreversible_slice_sampling. cc @ColCarroll