-
Notifications
You must be signed in to change notification settings - Fork 10
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
New feature request: add support to dsl.py representing free and bound variables in a probabilistic expression #213
Comments
I see that, but I'm not convinced that the same can't be accomplished by having a pair of 1) the expression and 2) a dictionary mapping from the variable to its assignment For example, you can have: from y0.dsl import P, X, Variable
value = Variable('x')
expression = P(X)
assignments = {X: value} If you had some more complicated expression that had multiple assignments, then maybe this is a different story, but I am not what that would look like besides |
The issue is that counterfactual transportability requires knowledge of whether a variable is bound or free. Examples of bound variables: P(X == -x, Y == +y, Y @ -x == -y | Z == -z, W @ -x == -w) Examples of free variables: P(X, Y, Y @ -x | Z, W @ -x) Here is a probabilistic expression with both free and bound variables: P(X, Y== +y, Y @ -x | Z, W @ -x == -w) The reason why this mixture can happen is that a variable that is free in an expression may be bound by an outer context such as a Sum[X](P(X, Y == -y)) It turns out that the counterfactual transportability algorithm can also have free or bound variables in an intervention, too! So we can have: Sum[X](P(Y @ X)) which is the same as: P(Y @ +x) + P(Y @ -x) Currently, interventions are always assumed to be bound variables, such that P(Y @ (X == -x, Z)) |
I don't quite understand what the meaning of the minus or plus sign is anymore with this proposal. This is syntactically valid, but I don't know what it should mean: P(-Y @ x)
P(+Y @ x)
P(-Y @ -x)
P(+Y @ -x)
P(-Y @ +x)
P(+Y @ +x) |
The current meaning of We currently cannot represent counterfactual variables that have Interventions as free variables, and while we can imagine scenarios where this will become a problem in the future, it is not a blocker for implementing any of the algorithms so far. |
I think we can get 90% of what we want if we simply display dsl objects like |
Currently in Y0 we can associate values with variables and represent the probability of a set of variables in terms of other variables, but Y0 lacks a mechanism for representing$P(\mathbf{X} = \mathbf{x})$ , where $\mathbf{X}$ denotes one or more variables and $\mathbf{x}$ denotes their corresponding values. As published, Algorithm 2 in Counterfactual Transportability: A Formal Approach requires this feature.
The text was updated successfully, but these errors were encountered: