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

Support mixtures defined with IfElse #76

Open
brandonwillard opened this issue Oct 15, 2021 · 0 comments · May be fixed by #169
Open

Support mixtures defined with IfElse #76

brandonwillard opened this issue Oct 15, 2021 · 0 comments · May be fixed by #169
Labels
enhancement New feature or request help wanted Extra attention is needed important This label is used to indicate priority over things not given this label op-probability Involves the implementation of log-probabilities for Aesara `Op`s

Comments

@brandonwillard
Copy link
Member

We need to add support for mixtures defined using the IfElse Op.

The following is a simple example that isn't supported:

import aesara.tensor as at

from aesara.ifelse import ifelse

from aeppl.joint_logprob import factorized_joint_logprob


srng = at.random.RandomStream(seed=2320)

I_rv = srng.bernoulli(0.5, name="I")
X_rv = srng.normal(0, 1, name="X")
Y_rv = srng.gamma(0.5, 0.5, name="Y")

Z_rv = ifelse(I_rv, X_rv, Y_rv)
Z_rv.name = "Z"

z_vv = Z_rv.clone()
i_vv = I_rv.clone()
logp_parts = factorized_joint_logprob({Z_rv: z_vv, I_rv: i_vv})
@brandonwillard brandonwillard added enhancement New feature or request help wanted Extra attention is needed op-probability Involves the implementation of log-probabilities for Aesara `Op`s important This label is used to indicate priority over things not given this label labels Oct 15, 2021
@rlouf rlouf moved this to Graph features in AePPL Roadmap Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed important This label is used to indicate priority over things not given this label op-probability Involves the implementation of log-probabilities for Aesara `Op`s
Projects
Status: Graph
Development

Successfully merging a pull request may close this issue.

1 participant