/** * @file DecisionTreeBuilder.cpp * @brief build decision trees * @author Erik Rodner * @date 05/06/2008 */ #include #include "vislearning/classifier/fpclassifier/randomforest/DecisionTreeBuilder.h" using namespace OBJREC; using namespace std; // refactor-nice.pl: check this substitution // old: using namespace ice; using namespace NICE; DecisionTreeBuilder::DecisionTreeBuilder() { } DecisionTreeBuilder::~DecisionTreeBuilder() { } void DecisionTreeBuilder::build ( DecisionTree & tree, const FeaturePool & fp, const Examples & examples, int maxClassNo ) { DecisionNode *root = build ( fp, examples, maxClassNo ); tree.setRoot(root); int depth, count; tree.statistics ( depth, count ); fprintf (stderr, "DecisionTree: maximum depth = %d, number of nodes = %d\n", depth, count ); }