X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=randomforest.cpp;fp=randomforest.cpp;h=bd96cd2f7177633e3d21181c95e7ff2c07682eb2;hb=d263f4b3a4f96c672317d317061f6adb72656427;hp=36a2c1a261f27514c394a370d0d97387ac9cbfac;hpb=51f21ea4aea22d0c574f6db749c9b3ae7793f765;p=mothur.git diff --git a/randomforest.cpp b/randomforest.cpp index 36a2c1a..bd96cd2 100644 --- a/randomforest.cpp +++ b/randomforest.cpp @@ -11,7 +11,7 @@ /***********************************************************************/ RandomForest::RandomForest(const vector > dataSet,const int numDecisionTrees, - const string treeSplitCriterion = "informationGain") : AbstractRandomForest(dataSet, numDecisionTrees, treeSplitCriterion) { + const string treeSplitCriterion = "informationGain") : Forest(dataSet, numDecisionTrees, treeSplitCriterion) { m = MothurOut::getInstance(); } @@ -58,6 +58,7 @@ int RandomForest::calcForrestVariableImportance(string filename) { //could cause maintenance issues later if other types of Abstract decison trees are created that cannot be cast as a decision tree. for (int i = 0; i < decisionTrees.size(); i++) { if (m->control_pressed) { return 0; } + DecisionTree* decisionTree = dynamic_cast(decisionTrees[i]); for (int j = 0; j < numFeatures; j++) { @@ -127,7 +128,7 @@ int RandomForest::populateDecisionTrees() { } /***********************************************************************/ // TODO: need to finalize bettween reference and pointer for DecisionTree [partially solved] -// TODO: make this pure virtual in superclass +// DONE: make this pure virtual in superclass // DONE int RandomForest::updateGlobalOutOfBagEstimates(DecisionTree* decisionTree) { try {