12345678910111213141516171819202122232425262728293031323334353637383940 |
- /**
- * @file DecisionTreeBuilder.cpp
- * @brief build decision trees
- * @author Erik Rodner
- * @date 05/06/2008
- */
- #include <iostream>
- #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 );
- }
|