This c++ project implements a number of algorithms for learning Bayesian network structures using state space search techniques. Please see the main urlearning site for more details.
Added by ninalu, 12/17/2020
This package implements continuous BIC score and Triplet A*.
It uses boost bjam/b2 to compile.
-
library dependency: boost, armadillo, mlpack
-
Need an adjacency skeleton file generated by MMPC or MMMB. To run without skeleton, then set all elements in the skeleton matrix to be 1. For example, for 4-variable network, the skeleton should look like: 1, 1, 1, 1
1, 1, 1, 1
1, 1, 1, 1
1, 1, 1, 1
-
To calculate scores from raw csv data file raw_data.csv, output to file my_scores.pss, BIC lamda=2 which corresponding to lambda=1 in GES, differing by a factor of two. The exact path to your score binary might depend on your compiler build/score/gcc-7/debug/score raw_data.csv my_score.pss -k skeleton.csv -f cBIC --lambda=2
-
To run A* on the score file, output file my_astar_result, and the result DAG matrix in my_astar_result.csv, element (i,j) is 1 if variable j is a parent of variable i The exact path to your astar binary might depend on your compiler
build/astar/gcc-7/debug/astar $score_file -i my_scores.pss -k skeleton.csv -n my_astar_result
-
To run Triplet A* on the score file, the result MEC in my_triplet_result.csv, where element (i,j) is 1 if variable i is a parent of variable j. If element (i,j) and element (j,i) are both 1, then edge i-j is undirected. The exact path to your triplet_astar binary might depend on your compiler
build/astar/gcc-7/debug/triplet_astar my_scores.pss -i my_score.pss -k skeleton.csv -n my_triplet_result