TuringLang / Bijectors.jl

Implementation of normalising flows and constrained random variable transformations

Home Page:https://turinglang.org/Bijectors.jl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support ProductDistribution

bgctw opened this issue · comments

When I try prescribing a prior product distribution for a multivariate random variable in Turing, I get
MethodError "MethodError: no method matching bijector(::Distributions.ProductDistribution{1, 0, Tuple{LogNormal{Float64}, LogNormal{Float64}}, Continuous, Float64})"

Are there any conceptual issues with supporting ProductDistribution of known simple Distributions with Bijectors.jl?

If there was just no request or time of implementing it, I could try implementing it, but I need some guidance on what to look out for and where to start.

Here is a minimal example:

using StableRNGs: StableRNG
using Bijectors

rng = StableRNG(42);
dist = Exponential(0.1)
b = bijector(dist)              

dp = product_distribution(dist,dist)
b = bijector(dp) # fails

using Bijectors v0.13.8

Distributions.Product works.

However, there is a deprecation warning on Product in Distributions.jl

I'm on it; have a working version. Just writing some tests.