X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=forest.h;h=9e9860de61f2ec10e9bf02192856a3224ca46193;hp=c9d29dc2321325f216f04c325bffb38548b2b529;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=5e1ab7456ec5e9e516cfa0fec6afef2c2a03a257 diff --git a/forest.h b/forest.h index c9d29dc..9e9860d 100644 --- a/forest.h +++ b/forest.h @@ -12,6 +12,7 @@ #include #include "mothurout.h" #include "macros.h" +#include "decisiontree.hpp" #include "abstractdecisiontree.hpp" /***********************************************************************/ //this is a re-implementation of the abstractrandomforest class @@ -20,12 +21,19 @@ class Forest{ public: // intialization with vectors Forest(const std::vector < std::vector > dataSet, - const int numDecisionTrees, - const string); + const int numDecisionTrees, + const string treeSplitCriterion, + const bool doPruning, + const float pruneAggressiveness, + const bool discardHighErrorTrees, + const float highErrorTreeDiscardThreshold, + const string optimumFeatureSubsetSelectionCriteria, + const float featureStandardDeviationThreshold); virtual ~Forest(){ } virtual int populateDecisionTrees() = 0; virtual int calcForrestErrorRate() = 0; virtual int calcForrestVariableImportance(string) = 0; + virtual int updateGlobalOutOfBagEstimates(DecisionTree* decisionTree) = 0; /***********************************************************************/ @@ -51,6 +59,14 @@ protected: vector globalDiscardedFeatureIndices; vector globalVariableImportanceList; string treeSplitCriterion; + + bool doPruning; + float pruneAggressiveness; + bool discardHighErrorTrees; + float highErrorTreeDiscardThreshold; + string optimumFeatureSubsetSelectionCriteria; + float featureStandardDeviationThreshold; + // This is a map of each feature to outcome count of each classes // e.g. 1 => [2 7] means feature 1 has 2 outcome of 0 and 7 outcome of 1 map > globalOutOfBagEstimates;