New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Belief Propagation algorithm #1741
Comments
About 3., IMO it makes sense to keep On one hand the
On the other hand the Hence, what do you think of keeping them separated? |
I would even suggest to rename |
We do have a pgmpy/pgmpy/models/MarkovNetwork.py Line 276 in cc2260e
I was thinking of merging them mainly because both are essentially message-passing algorithms. The difference is that one can deal with cycles in the graph and the other can't. Most users typically start with a Bayesian Network (or, less likely, a Markov Network) and might not be aware of the variations in different message-passing algorithms (such as which one to use under what conditions). So, my idea was to combine these two algorihthms such that if the model doesn't have any cycles the factor graph BP is used, otherwise Junction Tree algorithm is used. This would help in making the overall inference faster in the case when there are no cycles in the model. Furthermore, because the junction tree algorithm essentially does a factor graph BP on the constructed Junction tree, I believe there would be a lot of overlap in the code. Merging them would also make maintaining it easier. What do you think? |
Ref #1740
The text was updated successfully, but these errors were encountered: