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
Letting core.CausalBayesianNetwork inherit from pgmpy.DAG instead of pgmpy.BayesianNetwork would have some benefits.
Philosophically, it's a bit weird to let a Bayesian network inherit from a Bayesian network, as we're currently doing. Essentially, this means that we're trying to maintain two representations of the model (in cbn.cpds and in cbn.model), with extra code complexity to keep them in sync.
Instead, we could just let CausalBayesianNetwork inherit from pgmpy.DAG, and add a method to_pgmpy_bn() which we could use in queries etc. Note that the methods query(), sample() etc are not part of pgmpy.BayesianNetwork, and require the construction of different objects anyway.
The text was updated successfully, but these errors were encountered:
Letting core.CausalBayesianNetwork inherit from pgmpy.DAG instead of pgmpy.BayesianNetwork would have some benefits.
Philosophically, it's a bit weird to let a Bayesian network inherit from a Bayesian network, as we're currently doing. Essentially, this means that we're trying to maintain two representations of the model (in cbn.cpds and in cbn.model), with extra code complexity to keep them in sync.
Instead, we could just let CausalBayesianNetwork inherit from pgmpy.DAG, and add a method to_pgmpy_bn() which we could use in queries etc. Note that the methods query(), sample() etc are not part of pgmpy.BayesianNetwork, and require the construction of different objects anyway.
The text was updated successfully, but these errors were encountered: