Belief propagation is a message-passing algorithm used in graphical models, such as Bayesian networks and Markov random fields, to perform probabilistic inference. It is based on the idea of iteratively updating beliefs or probabilities associated with each node in the graph based on information received from neighboring nodes. Belief propagation is commonly used for tasks like estimating marginal probabilities, making predictions, and solving constraint satisfaction problems in various fields, including machine learning, computer vision, and artificial intelligence. It is particularly useful for handling complex, interrelated probabilistic relationships in graphical models.
This project implement Belief Propagation
and Loopy Belief Propagation
in java. This project relies on JGraphT for graph building and message passing respectively. This project also make reference to the git repo as well.
Please go to this wiki page for how to use it.
This is a maven project. .jar
file can be generated by standard maven operation.
-
Go to the root directory:
cd Belief-Propagation-Java
-
Run the following command:
mvn package
-
You can find
belief-propagation-java.jar
andbelief-propagation-java-jar-with-dependencies.java
inBelief-Propagation-Java\target
belief-propagation-java.jar
: Library without any other dependencybelief-propagation-java-jar-with-dependencies.java
: Library with dependency such as JGraphT.