lkbn is a tool for learning bounded tree-width Bayesian networks with latent variables
go get -u github.com/britojr/lkbn...
go install github.com/britojr/lkbn...
go test github.com/britojr/lkbn... -cover
lkbn --help
Usage: lkbn <command> [options]
Commands:
... Learn parameters for a given structure:
cd examples/
lkbn ctparam -d example.csv -p parms.yaml -bi example#0.ctree -bo example#1.ctree
Sample clique tree structures:
ctsample -d example.csv -p parms.yaml
YAML file containing specific parameters for the learning algorithms
em_max_iters: max number of EM iterations
./examples/parms.yaml
# structure sampling
treewidth : 1
num_samples : 3
latent_vars : 7, 12
# parameters learning
em_max_iters : 20
em_threshold : 1e-5
em_use_parms : true
em_init_iters : 2
em_restarts : 4