public void printConfusionMatrix() {
		// print header
		System.out.println("Confusion Matrix:\n");
		System.out.format("%20s", "");
		for (String classifier : testInstances.classifiers()) {
			System.out.format("%20s | ", classifier);
		}
		System.out.println("\n");
		// get set of classifiers
		Set<String> classifiers = testInstances.classifiers();
		// print each classifier group
		for (String classifierGroup : classifiers) {
			// initialize counters
			Map<String, Integer> counts = new HashMap<String, Integer>();
			for (String classifier : classifiers) {
				counts.put(classifier, 0);
			}
			// compute counts for each classification
			for (int i = 0; i < testInstance.size(); i++) {
				Instance instance = testInstance.get(i);
				if (instance.classifier().equals(classifierGroup)) {
					counts.put(predicted.get(i),
							counts.get(predicted.get(i)) + 1);
				}
			}
			// print results for classifier group
			System.out.format("%20s", classifierGroup);
			for (String classifier : classifiers) {
				System.out.format("%20s | ", counts.get(classifier));
			}
			System.out.println("\n");
		}
	}