waltercai / belief-propagation

An implementation of loopy belief propagation on a Bayesian Network (BN)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Belief Propagation on Bayesian Network

This is a program that runs loopy belief propagation on a Bayesian Network (BN), and generate the marginalized probability for each node on the network. The details of the algorithm refers to Kschischang et al. (2001), with the variation of using bethe cluster graph instead a pure factor graph of BN. The input format should be in Bayesian Network Interchange Format (BIF)

Usage

$ python bp <.bif file path> [-o output file] [-t threshold]
Options:
   -o, --output          output file name, default to 'result.txt'
   -t, --threshold       threshold for convergence default to 1e-10

Acknowledgment

The BIF parser is provided by Antoine Bosselut. The codes in the project is for the assignment 3 in CSE 515 - Statistical Methods in Computer Science, University of Washington.

About

An implementation of loopy belief propagation on a Bayesian Network (BN)


Languages

Language:Python 100.0%