Running the System
- Download the package here and extract.
- The options are explained here. If jardir is the name of the directory containing your jar file, the configuration file should be placed in jardir/src/ so that they system can find it.
- Run the jar file RunBB.jar. At a unix terminal, you would type:
java -jar RunBB.jar
- If everything worked, you should find output in various formats.
- An output file called
where dbname is what you entered in the configurations options in the field "dbname". You should be able to open this file using the UBC Bayes net tool. Here's a jar file for that tool. Other Bayes net readers should work too but we haven't tested them.
- An output file called
- The schema dbname_BN on your MySQL server should contain a table PathBayesNets that lists the edges in the learned Bayes net. There are many other database tables in that schema that contain information about the learned model.
- For Markov Logic Networks, there should be a file named
where dbname is what your entered in the configurations options in the field "dbname". Here is a sample based on database file "unielwin". please check it here.
Setting up the Target Database for Analysis
The program reads information about tables, columns, data types etc. for your database from the systems catalog. It assumes that your database schema follows a standard Entity-Relationship design .
- For every entity type (domain) in your relational structure, there should be a table listing the members of that domain. The table should have a single primary key field and no foreign key pointers. For instance, you may have a table Students with a single primary key field sid, and a table Courses with a single primary key field cid.
- For every type of link/relationship, there should be a table listing the pairs in the relationship. That table should have two primary key fields, each of which is a foreign key field as well. For instance, you may have a table Registered with two primary key fields sid, cid, where sid is a foreign key pointer to Student and cid a foreign key pointer to Courses.
- The program should also be able to handle a functional relationship, e.g. Father(Person). In that case it expects a single table with one primary key field and two foreign key fields.
The system tries to detect if your schema does not satisfy the ER design criteria and output a warning message.
When you choose the option AutomaticSetup = 1, the system creates a database named dbname_setup where dbname is what you entered in the configurations options in the field "dbname".
You can look at this database to see what information the program extracted from your schema. You can edit the setup database directly and then run the system again with AutomaticSetup = 0.
Tips and Tricks
- If you get an error message like:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
the first thing to try is to increase the heap space. One option that has worked for us is to run the program as follows
java -jar -Xms512m -Xmx1024m RunBB.jar
- Check the known issues and limitations file for other problems.
- If this doesn't help, contact us and we'll see what we can do. If you can send your database, that would be very helpful.