Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend lifting distributions to beyond Normal / Uniform #182

Open
zenna opened this issue Jan 3, 2022 · 1 comment
Open

Extend lifting distributions to beyond Normal / Uniform #182

zenna opened this issue Jan 3, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zenna
Copy link
Owner

zenna commented Jan 3, 2022

Currently, we can do:

\mu = @~ Normal(0, 1)
X = Normal(\mu, 1)

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)

@zenna zenna added the bug Something isn't working label Jan 3, 2022
@zenna
Copy link
Owner Author

zenna commented Jan 3, 2022

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 ω

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants