inference.initialize(network, new JoinTreeCompiler());
inference.run();
// now, show the probabilities again
// nodes = network.vertexSet();
System.out.println("CPTs after learning\n");
nodes = network.vertexSet();
for (BNNode node : nodes) {
System.out.println(
node.getName() + ":\n" + node.getFunction().toString()
+ "\n");
}