-
-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
enhancementNew feature or requestNew feature or requestgraph rewritingInvolves the implementation of rewrites to Aesara graphsInvolves the implementation of rewrites to Aesara graphshelp wantedExtra attention is neededExtra attention is neededimportantThis label is used to indicate priority over things not given this labelThis label is used to indicate priority over things not given this label
Description
I wonder whether it would be possible to rewrite the logp graphs to marginalize over finite discrete variables, indicated by the user (not necessarily all that are in the graph).
x_rv = at.random.bernoulli(0.7)
y_rv = at.normal([0, 1], [1, 1])[x_rv]
y = y_rv.type()
logp = joint_logprob(y_rv, {y_rv: y}, marginalize={x_rv})Whose logp would be p(y_rv=y | x_rv=0) * p(x_rv=0) + p(y_rv=y | x_rv=1) * p(x_rv=1)
This is straightforward(ish) if the marginalization happens just above the requested variable (e.g., y_rv), but gets more complicated if it happens at the top of a deeper graph.
brandonwillard and rlouftwiecki and tmbb
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgraph rewritingInvolves the implementation of rewrites to Aesara graphsInvolves the implementation of rewrites to Aesara graphshelp wantedExtra attention is neededExtra attention is neededimportantThis label is used to indicate priority over things not given this labelThis label is used to indicate priority over things not given this label
Type
Projects
Status
Graph