PyAgrum returns a causal formula doesn't make sense / python

116 views Asked by At

I'm using the pyagrum library for python, and I'm having trouble with the causal formulas the library calculates based on the network.

I have the following causal graph: The graph: "L[1,3]<-G->Q[1,4];L<-C[0,3]->Q;L<-P[1,4]->Q;Q->L;G->P"

I'd like to calculate: P(L | do(G))
PyAgrum returned me: This equation
But this backdoor on C does NOT exist, so it's definitely wrong. I did it by myself and got this equation: The equation I got by hand

How do I know if what I'm doing it's right? I was trusting pyagrum to correct me but now I don't know what to do.

1

There are 1 answers

1
Pierre-Henri Wuillemin On BEST ANSWER

We have to check why the given explanation is wrong. However, the computation is correct. And the formula also : P(L|C,G) will have to be computed using classical inference and will, give at the end, the same formula as yours (actually, in your graph, it seems that P(L|do(G))=P(L|G) )