Skip to content

A Bayesian network calculator for both exact (enumeration) and approximate inference (rejection sampling, likelihood weighting).

Notifications You must be signed in to change notification settings

sallaben-education/bayesian-inference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bayesian-inference

How to compile from source

  • 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)

    • Run make exact in the project directory. This will only compile the program.
  • Compile approximate inference (ApproxInferer)

    • Run make approx in the project directory. This will only compile the program.
  • Remove compiled files

    • Run make clean in the project directory. This will delete all compiled .class files.

Argument formatting {ARGS}

  • ExactInferer arguments are formatted as follows:
    • filename.[xml/bif] QUERYVAR EVIDENCE1 value1 EVIDENCE2 value2 …
    • Example: {ARGS} = dog-problem.xml bowel-problem hear-bark true
  • ApproxInferer arguments are formatted as follows:
    • #SAMPLES filename.[xml/bif] QUERYVAR EVIDENCE1 value1 EVIDENCE2 value2 …
    • Example: {ARGS} = 10000 insurance.bif SocioEcon VehicleYear Older DrivingSkill SubStandard

How to execute program

  • Execute compiled ExactInferer
    • java -cp ./build exact/App {ARGS}
  • Execute compiled ApproxInferer
    • java -cp ./build approx/App {ARGS}

About

A Bayesian network calculator for both exact (enumeration) and approximate inference (rejection sampling, likelihood weighting).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published