How to Run | Javadoc

Example Run:

java -jar dist/BKR.jar > test.txt < experiments/structures/Scrosstests.txt
As is clear from the "Anatomy of the output file" below, sending all the output to a file and then dealing with it is highly recommended. The experiments/structures contains files with all the structures used in testing. The format is describesd in Appendix A in the writeup.

Parameters:

java -jar dist/BKR.jar -help
The above shows what's available. For example:
java -jar dist/BKR.jar -batch 25 -complex -lsamp 0.5 > Schaintests050.out < experiments/structures/Schaintests.txt

Anatomy of the output file:

[-complex]									<-- what the args[] array looks like
-----------SETTINGS------------							<-- what all the parameterizable setting are after reading in user arguments
-help=false
-gibbs=false
-complex=true
-lsamp=0.9 [DEFAULT]
-heat=0.5 [DEFAULT]
-nsamp=-1 [DEFAULT]
-nsim=5 [DEFAULT]
-nval=4 [DEFAULT]
-nsearch=5 [DEFAULT]
-seed=1500 [DEFAULT]
-batch=1 [DEFAULT]
-------------------------------
New Beaker with a soup of 4 chemicals!						<-- some colorful commentary about beakers
1 Calor (1) + 1 Sadium (0) > 1 Modinol (2)					(it is silenced by setting batch to >1)
1 Calor (1) + 1 Sadium (0) > 1 Salium (3)
Created Beaker (2/2) ... Added successfully!					<-- if the structure in the input file is bad, this will say "Ignored."

New Beaker with a soup of 5 chemicals!
1 Virol (1) + 1 Nimole (0) > 1 Vabium (2)
1 Virol (1) + 1 Nimole (0) > 1 Tiponal (3)
1 Tiponal (3) + 1 Vabium (2) > 1 Rotine (4)
Created Beaker (3/3) ... Added successfully!
What follows after this is meant to be pasted into something like Excel, then tokenized by |. In Excel, this can be accomplished by copy-pasting into a single column, then going to Data, then Text to columns.
Run#|Beaker#|# Equations|# Chemicals|# Edges in DAG|# Samples|Consistency_in|# Search Updates|Best Score|Consistency on Held Out|Consistency_out|# Flipped edges|# Missing edges|# Extra edges|# Correct Edges
0|0|2|4|5|4000|0.9228500000000001|1|-7347.204446194337|0.94425|0.8958999999999999|3|0|1|2
0|1|3|5|7|5000|0.9061199999999999|4|-9917.510634885939|0.9294800000000001|0.8902000000000001|3|1|1|3
And here is some verbose output, with the original and learned configuration for every beaker and every run.
-----------------BEAKER # 0--------------------------				<-- this beaker# lines up with the beaker# in the spreadsheet
---------------------------------------------------------
|V|=4 |E|=5
2>3										<-- now these are in ID's, not weird names.
1>3										when they were in weird name form, though, they had their ID's in parentheses!
0>3										like this: 1 Calor (1) + 1 Sadium (0) > 1 Modinol (2)
1>2
0>2
CPT(0):
	[]									<-- not dependent on anything
		p(0)=0.2	(1.0/5.0)					<-- probability alongside actual counts/obsevation weights
		p(1)=0.2	(1.0/5.0)					but these are not very interesting in the original, only in the learned

		... and so on ...
		
CPT(3):
	[2, 0, 0]								<-- parent values; parents are listed in order. 3's parents are 0, 1, and 2, for example
		p(0)=1.0	(1.0/1.0)

		... and so on ...
		
----------------------------SOLUTION FROM RUN # 0				<-- first result from learning! This run# lines up with the run# in the spreadsheet
|V|=4 |E|=6									<-- similarly, its structure is given, followed by the CPTs
1>0
3>2
1>3
1>2
3>0
2>0
CPT(0):
	[2, 0, 0]
		p(0)=0.6339622641509434	(168.0/265.0)				<-- the things in parents are literally observations, so [2,0,0] was observed 265 times
		p(1)=0.1660377358490566	(44.0/265.0)
		... and so on ...