ce = new ClassificationEvaluator();
MultinomialNaiveBayes mnb = new MultinomialNaiveBayes(bagEvents);
for(int i=0;i<testBagEvents.size();i++) {
BagEvent be = testBagEvents.get(i);
//Map<String,Double> results = mnb.testBag(be.getClassLabel(), be.getFeatures());
Map<String,Double> results = mnb.testBag(be.getFeatures());
System.out.println(be.getClassLabel() + "\t" + mnb.testBag(be.getFeatures()));
ce.logEvent(be.getClassLabel(), mnb.bestResult(results));
}
System.out.println(ce.getAccuracy());
System.out.println(ce.getKappa());