private static DecisionForest processOutput(Map<Integer, MapredOutput> output,
PredictionCallback callback) {
List<Node> trees = new ArrayList<Node>();
for (Map.Entry<Integer, MapredOutput> entry : output.entrySet()) {
MapredOutput value = entry.getValue();
trees.add(value.getTree());
if (callback != null) {
int[] predictions = value.getPredictions();
for (int index = 0; index < predictions.length; index++) {
callback.prediction(entry.getKey(), index, predictions[index]);
}
}
}