Bayesian Belief Network CLI/TUI tool and Go module.
- Visualize, query and explore networks in the interactive TUI app
bbni
. - Supports decision networks (aka influence diagrams), including sequential decisions.
- Provides logic nodes for logic inference in addition to probabilistic inference.
- Train and query networks from the command line with
bbn
. - Human-readable YAML format for networks, as well as BIF-XML.
- Plenty of examples with introductory text, shown in-app.
Pre-compiled binaries for Linux, Windows and MacOS are available in the Releases.
Alternatively, install the latest development versions of
bbn
andbbni
using Go:go install github.com/mlange-42/bbn/cmd/bbn@main go install github.com/mlange-42/bbn/cmd/bbni@main
bbn
Go module is still under development and highly unstable.
Add BBN to a Go project:
go get github.com/mlange-42/bbn
Try the famous sprinkler example:
bbni _examples/bbn/sprinkler.yml
Same example with the command line tool, given some evidence:
bbn inference _examples/bbn/sprinkler.yml -e Rain=no,GrassWet=yes
Train a network from data:
bbn train _examples/bbn/fruits-untrained.yml _examples/bbn/fruits.csv
Also try the other examples in folder _examples.
Run them with bbni
and play around, but also view their .yml
files
to get an idea how to create Bayesian Networks.
bbn
Go module is still under development and highly unstable.
See the examples in the API reference.
This project is distributed under the MIT license.