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
What if you use Distributions.Product
?
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.