Code for Exporting a learned First-Order Bayesian Network to a Bayesian Network in BIF format.
Input:
- A relational database
- A learned Bayesian network (using FactorBase).
Output: An .xml file in BIF format.
You have used BIF_Generator if you run the FactorBase on your relational database. The Bif_'YOURDATABASENAME'.xml is created in FactorBase/jar folder. If you wish to run the BIF_Generator separately, please follow these steps.
-
Import data into your database and run FactorBase.
-
Clone the BIF_Generator repository by
git clone https://github.com/sfu-cl-lab/BIF_Generator.git -
Navigate to
BIF_Generator/cfgfolder and modify the config filesubsetctcomputation.cfgby copying the same config file content that you used to run FactorBase.
-
Navigate to
BIF_Generator/jarwhere BIF_Generator.jar is located.Export the learned Bayesian Network (BN) by
java -jar BIF_Generator.jar.OR
Navigate to parent directory
BIF_Generatorand compile the .java source code byjavac -cp ".:./lib/*" BIF_Generator.java
java -cp ".:./lib/*" BIF_Generator -
The output file is created in the folder
Bif_GeneratornamedBif_<YOURDATABASENAME>.xml
We have tested the BIF_Generator with the AIspace tool from UBC.
-
Download and run the tool
Download tool (.jar format) and
Run byjava -jar bayes.jarOR
Download tool (.exe format) and
Run the .exe file -
Go to
File > Load from Fileand select theBif_<YOURDATABASENAME>.xmlin the folderBif_Generator.
