TuringLang / JuliaBUGS.jl

A domain specific language (DSL) for probabilistic graphical models
https://turinglang.org/JuliaBUGS.jl/
MIT License
22 stars 4 forks source link

Compile BUGS models to a `Distributions.jl` Distribution type #27

Open yebai opened 2 years ago

yebai commented 2 years ago

Another very useful target for BUGS models is a Distributions.Distribution object. This would allow us to use these models as a new Distribution in other PPLs including Turing.

Here are two concrete use cases:

  1. use BUGS language to specify a complicated hierarchical prior, then the DAG would allow us to perform re-parameterisation optimisation etc. See e.g. here
  2. use BUGS language to specify an HMM/SSM model, then DAG would allow us to perform SMC/PMCMC inference efficiently
sunxd3 commented 1 year ago

For now, we will postpone supporting this util https://github.com/JuliaStats/Distributions.jl/issues/1762 or similar interface is implemeted.

sunxd3 commented 11 months ago

Update on this https://github.com/JuliaStats/Distributions.jl/pull/1803

sethaxen commented 11 months ago

@sunxd3 what's your usecase for a NamedTupleVariate?

sunxd3 commented 11 months ago

@sethaxen mostly an interface nicety, I am thinking compiling BUGS to a NamedTupleVariat, then the model can be used in a Turing model (and vice versa).