network.finalizeStructure();
//SamplingQuery query = new SamplingQuery(network);
EnumerationQuery query = new EnumerationQuery(network);
CalcProbability messageProbability = new CalcProbability(this.k);
messageProbability.addClass(SPAM_DATA.length);
messageProbability.addClass(HAM_DATA.length);
double probSpam = messageProbability.calculate(0);
spamEvent.getTable().addLine(probSpam, true);
query.defineEventType(spamEvent, EventType.Outcome);
query.setEventValue(spamEvent, true);