Set<String> categories = object.getCategories().keySet();
for (String fromCategory : categories) {
Double fromProb = d.getCategoryProbability(clasMethod, fromCategory);
ClassificationMethod probEstimateMethod = getProbabilityEstimationMethod(clasMethod);
Map<String, Double> toClassifiedAs = d.getProbabilityVector(probEstimateMethod);
// Both from and to are probabilistic, so we have two nested loops and we
// compute the estimated confusion matrix here.
for (String toCategory : categories) {