BayesianEvent x3 = network.createEvent("x3", labels);
network.finalizeStructure();
TrainBayesian train = new TrainBayesian(network,data,10);
SearchK2 search = (SearchK2)train.getSearch();
double p = search.calculateG(network, x1, x1.getParents());
Assert.assertEquals(3.607503E-4, p, 0.0001);
network.createDependency(x1, x2);
p = search.calculateG(network, x2, x2.getParents());
Assert.assertEquals(0.0011111, p, 0.0001);