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

Getting the correct identifiability expression for the example from Shpitser and Pearl (2008) #198

Open
neildhir opened this issue Dec 22, 2023 · 0 comments

Comments

@neildhir
Copy link

neildhir commented Dec 22, 2023

Hi there!

First, excellent package, it is a joy to use.

I was wondering if you could give some input on your example that you provide in the notebook here: https://github.com/y0-causal-inference/y0/blob/main/notebooks/Identification.ipynb - specifically the one regarding figure 3(a) from Complete Identification Methods for the Causal Hierarchy by Shpitser and Pearl (2008) page 1951.

In the notebook (see screenshot below), the final line of that example returns the intervention in terms of conditionals from $P$.

Screenshot 2023-12-22 at 13 15 39

This is not the same expression as the one provided by the authors, which is (as you yourselves put it): $$P_x(y_1,y_2) = \sum_{w_2} P(y_1,w_2) \sum_{w_1} P(y_1 \mid x , w_1)P(w_1)$$.
I am trying to understand why y0 is not returning the same expression as in the original example, and if you could steer me in the right direction to accomplish that. I.e. can additional computations be invoked to simplify the expression into the same form as derived by Shpitser and Pearl?

MWE:

from y0.graph import NxMixedGraph
from y0.dsl import W1,W2,X,Y1,Y2


GG3a = NxMixedGraph.from_edges(
    directed=[
        (W1, X),
        (X, Y1),
        (W2, Y2),
    ],
    undirected=[
        (W1, Y1),
        (W1, W2),
        (W1, Y2),
        (W2, X),
    ],
)

query = Identification.from_expression(graph=GG3a, query=P(Y1 @ X, Y2 @ X))
identify(query)
Screenshot 2023-12-22 at 13 45 33

That output is different from the paper and your own notebook. Hence I am trying to understand what is happening here (or more likely where I am going wrong).

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant