/*
* Generate the test sets, classifying each one as we go
*/
List<Pair<String, Double>> result = new ArrayList<Pair<String, Double>>();
EventMap eventMap = new EventMap(unknownDocument);
Instance currentTest = new Instance(allEvents.size() + 1);
currentTest.setValue((Attribute) attributeList.elementAt(0), "Unknown");
int i = 1; // Start at 1, again
for (Event event : allEvents) {
currentTest.setValue((Attribute) attributeList.elementAt(i),
eventMap.normalizedFrequency(event));
i++;
}
currentTest.setDataset(trainingSet);
double[] probDistribution;
try {
probDistribution = classifier.distributionForInstance(currentTest);
} catch (Exception e) {