← Back to project summary Bayesian Network Inference Engine
A closer look at the app, the systems I owned, and the features behind it.
What it does
- Represents discrete Bayesian networks as nodes with conditional probability tables keyed on parent value tuples.
- Computes joint, marginal, and conditional probabilities, and full conditional distributions over query variables.
- Runs exact inference by enumeration in topological order.
- Runs approximate inference three ways: rejection sampling, likelihood weighting, and Gibbs sampling.
Notable pieces
- Markov blanket computation from the graph structure, which is what makes the Gibbs sampler correct.
- A shared sample generator that handles both plain prior sampling and likelihood weighting, returning a weight alongside the sample.
- Clear failure behavior: a bad conditional probability table key prints the key it wanted and the keys that exist, rather than raising an opaque error.
- A unittest suite covering the inference paths.