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

Add support for the Poisson-Gamma closed-form posterior #37

Closed
rlouf opened this issue Jun 16, 2022 · 0 comments · Fixed by #58
Closed

Add support for the Poisson-Gamma closed-form posterior #37

rlouf opened this issue Jun 16, 2022 · 0 comments · Fixed by #58
Labels
enhancement New feature or request exact posterior help wanted Extra attention is needed miniKanren refactoring A change that improves the codebase but doesn't necessarily introduce a new feature

Comments

@rlouf
Copy link
Member

rlouf commented Jun 16, 2022

Consider the following observation model:

import aesara
import aesara.tensor as at

srng = at.random.RandomStream(4238)

alpha = at.scalar()
beta = at.scalar()
observed = at.scalar()

Z_rv = srng.gamma(alpha, beta, name="Z_1")
Y_rv = srng.poisson(Z_rv, name="Y")

Z_rv is a conjugate prior of Y_rv and if the observed value of the latter is observed the model is equivalent to the following:

Z_rv = srng.gamma(alpha + observed, beta + 1)
@rlouf rlouf added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed miniKanren exact posterior labels Jun 16, 2022
@brandonwillard brandonwillard added refactoring A change that improves the codebase but doesn't necessarily introduce a new feature and removed good first issue Good for newcomers labels Jul 7, 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 exact posterior help wanted Extra attention is needed miniKanren refactoring A change that improves the codebase but doesn't necessarily introduce a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants