Example scripts
Look at scripts in scripts directory in the download folder.The corresponding toy dataset is in the data directory.
The folders are formatted using the standard format.
Using RDN-Boost 101
For this tutorial, assume that we are trying to predict who would have cancer , given we know who smokes and who are friends.Data
All the facts/knowledge regarding the problem need to be in one folder, say toy_cancer. Make sure to end all lines with "." .
All the facts such as friends(Alice, Bob) would be in toy_cancer_facts.txt .
All the positive examples for training should be in toy_cancer_pos.txt and negative examples in toy_cancer_neg.txt.
The background knowledge should be in toy_cancer_bk.txt.
Look at the example data(data/toy_cancer/train) in the downloaded tar. Note that we used "import:" in train_bk.txt to have a common bk file for both train and test folders.
Learning
As per the simple usage instruction, you need to specify the target predicate, location of the auc.jar(if you want to compute AUC), number of trees and location of the training data.
e.g. scripts/run_toy_learning.sh
java -cp ../WILL.jar edu.wisc.cs.Boosting.RDN.RunBoostedRDN \ -aucJarPath ".." \ -target cancer \ -trees 20 \ -l -train ../data/toy_cancer/train/ \
The models are automatically saved in the training folder/models e.g. ../data/toy_cancer/train/models.
Inference
If you wish to just run inference, you should mention the location of the model folder using "-model". You could use the first k trees(where k < # learning trees) from the model by specifying "-trees k".
e.g. scripts/run_toy_infer.sh
java -cp ../WILL.jar edu.wisc.cs.Boosting.RDN.RunBoostedRDN \ -aucJarPath ".." \ -target cancer \ -trees 20 \ -model ../data/toy_cancer/train/models \ -i -test ../data/toy_cancer/test/ \