A Bayesian network calculator for both exact (enumeration) and approximate inference (rejection sampling, likelihood weighting).
The source files will be compiled using javac
with options -g -cp . -d ./build
per project specifications. After compilation, the new .class files can be run with java -cp ./build
(see ./Makefile
and How to execute program for further specifications or exact commands).
Compile exact inference (ExactInferer)
make exact
in the project directory. This will only compile the program.make approx
in the project directory. This will only compile the program.make clean
in the project directory. This will delete all compiled .class files.filename.[xml/bif] QUERYVAR EVIDENCE1 value1 EVIDENCE2 value2 …
dog-problem.xml bowel-problem hear-bark true
#SAMPLES filename.[xml/bif] QUERYVAR EVIDENCE1 value1 EVIDENCE2 value2 …
10000 insurance.bif SocioEcon VehicleYear Older DrivingSkill SubStandard
java -cp ./build exact/App {ARGS}
java -cp ./build approx/App {ARGS}