-
-
Notifications
You must be signed in to change notification settings - Fork 11
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 closed-form posteriors #4
Comments
FYI: If we lift random/measurable variables through mixtures, we can enable some important closed-form posterior opportunities. For example: import aesara
import aesara.tensor as at
srng = at.random.RandomStream(4238)
I_rv = srng.bernoulli(0.5, name="I")
Z_1_rv = srng.gamma(10, 100, name="Z_1")
Z_2_rv = srng.gamma(1, 1, name="Z_2")
Z_rv = at.stack([Z_1_rv, Z_2_rv])
# Observation model
Y_rv = srng.poisson(Z_rv[I_rv], name="Y") Conjugate updates are available between The model after lifting should be equivalent to the following: Z_1_new_rv = srng.poisson(Z_1_rv, name="Z_1_new")
Z_2_new_rv = srng.poisson(Z_2_rv, name="Z_2_new")
# New observation model
Y_new_rv = at.stack([Z_1_new_rv, Z_2_new_rv])
Y_new_rv.name = "Y_new" The |
@ricardoV94, @rlouf, @zoj613, we should try to get this example working next. It's something that could be set up without too much effort and makes for a great combination of all our efforts. |
We should split this off into a bunch of sub-issues for each (group of) closed-form posteriors we want to implement. |
We need to copy over the
kanren
relations insymbolic_pymc
so that we can sample directly from closed-form posteriors—when possible. See the basic example here.Within the general process of constructing a sampler for a model graph (see #3), we could apply these rewrites as well, and—in some cases—simply return a graph of the joint posterior, instead of a sampler graph.
The text was updated successfully, but these errors were encountered: