-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement logprob inference for binary operations #6633
Comments
@ricardoV94 I would like to work on this issue starting with the logical comparison Ops (gt, lt, ge, le), but I needed some clarification about the value of logp for y.
Since y is a bool type, how exactly is |
@shreyas3156 My code comments where wrong, I updated them. Anyway, the idea is
Does that make sense? Just saying the probability of a simple constant inequality (the constant may be another valued RV) is the same as some CDF expression on the underlying variable. |
Yes, that makes perfect sense now. Thanks! |
Next interesting binary Ops would be |
Description
Using CDFs it should be simple to derive the logp of graphs of the form:
https://github.com/pymc-devs/pymc/blob/main/pymc/logprob/censoring.py includes rewrites of other operations that rely on CDF such as
clip
, andround
.More challenging, but also fun, would be to support
all
andany
, whose logp should be the sum of the logp that all binary variables evaluate to True or False:any = 1 - all(x==False)
For ordering, and min/max see #6350
The text was updated successfully, but these errors were encountered: