Open zenna opened 2 years ago
I'm not sure if the way it is currently done is a good idea.
Distributions.Normal(μ, σ) =
(id, ω) -> Normal(liftapply(μ, ω), liftapply(σ, ω))(id, ω)
This is relying on the fact that "normal" application of Normal is Normal(::Float64, ::Float64)
, etc, and assumes that anything that isn't caught must be a random variable. Unclear whether this is currently true, but seems like a bad design choice in general. Problem is that we have no way to dispatch on random variables, which they are just arbitrary function of ω
Currently, we can do:
and it will create the corresponding pointwise application, but it is does not work beyond Normal and Bernoulli distributions, which it should (see OmegaDistributions.jl)