简体   繁体   中英

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

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.

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) )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM