X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=randomforest.hpp;h=30eb43842f8cb280e1e4e95919909885f2702d28;hb=70491a12902e89b85cfa6b44a7b7fbe066ee2ac1;hp=716d1a1ede60c667840172db275814c73867041a;hpb=90708fe9701e3827e477c82fb3652539c3bf2a0d;p=mothur.git diff --git a/randomforest.hpp b/randomforest.hpp old mode 100755 new mode 100644 index 716d1a1..30eb438 --- a/randomforest.hpp +++ b/randomforest.hpp @@ -10,10 +10,10 @@ #define rrf_fs_prototype_randomforest_hpp #include "macros.h" -#include "abstractrandomforest.hpp" +#include "forest.h" #include "decisiontree.hpp" -class RandomForest: public AbstractRandomForest { +class RandomForest: public Forest { public: @@ -23,14 +23,14 @@ public: //NOTE:: if you are going to dynamically cast, aren't you undoing the advantage of abstraction. Why abstract at all? //could cause maintenance issues later if other types of Abstract decison trees are created that cannot be cast as a decision tree. - virtual ~RandomForest() { - for (vector::iterator it = decisionTrees.begin(); it != decisionTrees.end(); it++) { - // we know that this is decision tree, so we can do a dynamic_case here - DecisionTree* decisionTree = dynamic_cast(*it); - // calling the destructor by deleting - delete decisionTree; - } - } +// virtual ~RandomForest() { +// for (vector::iterator it = decisionTrees.begin(); it != decisionTrees.end(); it++) { +// // we know that this is decision tree, so we can do a dynamic_case here +// DecisionTree* decisionTree = dynamic_cast(*it); +// // calling the destructor by deleting +// delete decisionTree; +// } +// } int calcForrestErrorRate(); int calcForrestVariableImportance(string);