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

FR rules for (Gaussian + UniformPolygon).reduce(logaddexp) #596

Open
2 tasks
fritzo opened this issue May 8, 2022 · 0 comments
Open
2 tasks

FR rules for (Gaussian + UniformPolygon).reduce(logaddexp) #596

fritzo opened this issue May 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@fritzo
Copy link
Member

fritzo commented May 8, 2022

It would be great to have reduction rules for uniform likelihoods wrt Gaussian latent variables:

  • (MyContinuousDist + Uniform).reduce(logaddexp) implemented via .cdf()
  • (Gaussian + UniformPolygon).reduce(logaddexp) implemented via quadrature (MC or QMC)

This could be used for Pyro and NumPyro probabilistic programs with constraint-like likelihoods, something like

def model(data):
    z = pyro.sample("z", Normal(...))
    # Observe a constraint like lb < z < ub.
    pyro.sample("x", Uniform(...), obs=z)

here we can be lazy and compute marginal likelihood via Normal(...).cdf([lb, ub]).

@fritzo fritzo added the enhancement New feature or request label May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant