X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=randomforest.cpp;h=bd96cd2f7177633e3d21181c95e7ff2c07682eb2;hp=36a2c1a261f27514c394a370d0d97387ac9cbfac;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=90708fe9701e3827e477c82fb3652539c3bf2a0d 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 {