You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases when querying on a network on which a do-intervention has been done, an endless-loop in the build_join_tree() function of bbn.py occurs. This seems to happen when the preceding intervention disconnects the graph. Below you can see an example graph on which the problem occurred:
An intervention on x0 should remove the edge from x1 to x0. When querying for x1, the program runs in an endless-loop. More specifically (with bn having the structure as in the image and already fit to data).
ie = InferenceEngine(bn)
ie.do_intervention('x0', 1)
prediction = ie.query()['x1'] # this never terminates without raising any error
Interestingly, doing the intervention ie.do_intervention('x2', 1) on the above graph raises ValueError: Do calculus cannot be applied because it would result in an isolate. While this is already easier to debug, to the best of my knowledge this should also be a valid operation in the setting of causal graphs and do-calculus.
Thanks for posting this. I think you have summarized what I wanted to.
In fact, I have been facing a similar issue when I try to do a double intervention where I do not get an error saying there is an isolate but an infinite computational query is generated.
Thank you @ukm5 for reporting this. This is also linked to issue #45. The above has been fixed with this commit, and will be available in the next CausalNex release.
Hello,
In some cases when querying on a network on which a do-intervention has been done, an endless-loop in the build_join_tree() function of bbn.py occurs. This seems to happen when the preceding intervention disconnects the graph. Below you can see an example graph on which the problem occurred:
An intervention on x0 should remove the edge from x1 to x0. When querying for x1, the program runs in an endless-loop. More specifically (with bn having the structure as in the image and already fit to data).
Interestingly, doing the intervention ie.do_intervention('x2', 1) on the above graph raises
ValueError: Do calculus cannot be applied because it would result in an isolate
. While this is already easier to debug, to the best of my knowledge this should also be a valid operation in the setting of causal graphs and do-calculus.Environment:
The text was updated successfully, but these errors were encountered: