Skip to content

sfu-cl-lab/BIF_Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIF_Generator

Build Status
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.

How to Use

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.

  1. Import data into your database and run FactorBase.

  2. Clone the BIF_Generator repository by

    git clone https://github.com/sfu-cl-lab/BIF_Generator.git

  3. Navigate to BIF_Generator/cfg folder and modify the config file subsetctcomputation.cfg by copying the same config file content that you used to run FactorBase.

  1. Navigate to BIF_Generator/jar where BIF_Generator.jar is located.

    Export the learned Bayesian Network (BN) by

    java -jar BIF_Generator.jar.

    OR

    Navigate to parent directory BIF_Generator and compile the .java source code by

    javac -cp ".:./lib/*" BIF_Generator.java
    java -cp ".:./lib/*" BIF_Generator

  2. The output file is created in the folder Bif_Generator named Bif_<YOURDATABASENAME>.xml

Visualize the Bayesian Network

We have tested the BIF_Generator with the AIspace tool from UBC.

  1. Download and run the tool

    Download tool (.jar format) and
    Run by java -jar bayes.jar

    OR

    Download tool (.exe format) and
    Run the .exe file

  2. Go to File > Load from File and select the Bif_<YOURDATABASENAME>.xml in the folder Bif_Generator.

You will obtain a result like that shown in the Image BNinAIspace.

About

BIF Generator for FactorBase

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages