12345678910111213141516171819202122232425262728293031323334353637383940 |
- #include <iostream>
- #include "vislearning/classifier/fpclassifier/randomforest/DecisionTreeBuilder.h"
- using namespace OBJREC;
- using namespace std;
- 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 );
- }
|