/BayesNet

Simple Bayesian Network implementation in C++ based on the Coursera course Probabilistic Graphical Models (PGM)

Primary LanguageC++BSD Zero Clause License0BSD

BayesNet

This is a simple library for inference in Bayesian Networks in C++. It implements some basic algorithms for working with Probabilistic Graphical Models (PGM). It is based on the online Stanford course "Probabilistic Graphical Models" on Coursera. There are no dependencies to other libraries, except GoogleTest.

Features

Probability calculation with "factors"

  • factor class (conditional probability table)
  • factor product/sum
  • (max) marginalization
  • joint probability

Inference algorithms

Decision algorithms

Benefit

  • learn how to do exact inference and solve decision problems
  • efficient exact inference with the Clique Tree algorithm (Junction Tree)
  • online inference with Dynamical Bayesian Networks (DBN)

Limitations

  • currently only discrete variables are supported
  • currently only simple influence diagrams possible (one decision, one utility factor)

Tutorial

There is a tutorial explaining factor calculation and showing how to run inference on Bayesian Networks.

Examples

Install, build, run

see How to install, build and run

License

BayesNet is free software. It is released under the BSD Zero Clause License.

Recommended reading/videos

Tools

  • Open Markov: Open-source software tool for Probabilistic Graphical Models in Java