Replies: 2 comments 2 replies
-
@gweesip I believe the method that you are actually looking for is The idea behind having a do method for DAG/BN was to allow for network structure level analysis for interventions. But I do agree that this has become confusing with do methods for both DAG and BNs. I think a potential solution could be keep the do method for DAG as it is right now (and fix the documentation), and change the BN one to allow specifying values for the do variables. What do you think? |
Beta Was this translation helpful? Give feedback.
-
@ankurankan I am aware of the It was mostly just a question of why the CPD was being marginalized, but if the use case of the I think it'd be worthwhile to make the |
Beta Was this translation helpful? Give feedback.
-
From the docs, the
BayesianNetwork.do
method:But the
DAG.do
method:I believe the DAG interpretation of the do operator is correct and since the underlying graph of a
BeyesianNetwork
is aDAG
, it doesn't really make sense to me that they are different operations. Furthermore, neither of these methods currently allow you to specify a value for the do variable, so we are missing the second half of the effect specified. TheBayesianNetwork
version marginalizes out all the other variables, but this doesn't have the effect of "setting X to the given value x" either.edit: If using this for inference on an modified model, there is a simple workaround of simply adding the variable and value to the evidence of a query, but this is an easy thing to miss/forget, especially if you assume that the do operator has already handled it.
Beta Was this translation helpful? Give feedback.
All reactions