Bagging bagging = new Bagging(getTreeBuilder(), data);
TreeID key = new TreeID();
log.debug("Building {} trees", nbTrees);
SingleTreePredictions callback = null;
int[] predictions = null;
for (int treeId = 0; treeId < nbTrees; treeId++) {
log.debug("Building tree number : {}", treeId);
if (isOobEstimate() && !isNoOutput()) {
callback = new SingleTreePredictions(data.size());
predictions = callback.getPredictions();
}
Node tree = bagging.build(treeId, rng, callback);
key.set(partition, firstTreeId + treeId);