The aim was to create an alert system for the fictional Mecynian Canal, an artificial sea-level waterway, by using Bayesian networks to reason with uncertainty. Bayesian networks were modelled using AISpace. The implementation consists of a XML parser as well as an algorithm to merge two Bayesian networks that was adapted from Feng et al. (2014).
Navigate into the src directory:
cd src
Compile all .java
files:
javac *.java
To run the application, your command should take the following form:
java Main <BN1> <BN2>
For example, pass:
java Main example1 example2
Please note that the path to the saved-models
directory as well as the .xml file extension is hard-coded can be omitted.
The output should be:
Net: example1
-
...
Net: example2
-
...
Net: Merger
-
Name: NoFuel
Parents: none
CPT:
[0.15, 0.85]
-
Name: RoadIcy
Parents:[InAlaska, Winter]
CPT:
[0.7777777777777777, 0.2222222222222222]
[0.4576271186440678, 0.5423728813559322]
[0.5602409638554217, 0.43975903614457834]
[0.2537878787878788, 0.7462121212121213]
-
...
Valid commands:
java Main CANAL1 CANAL2mod