5 // Created by Abu Zaher Faridee on 7/20/12.
6 // Copyright (c) 2012 Schloss Lab. All rights reserved.
9 #ifndef rrf_fs_prototype_randomforest_hpp
10 #define rrf_fs_prototype_randomforest_hpp
14 #include "decisiontree.hpp"
16 class RandomForest: public Forest {
21 RandomForest(const vector <vector<int> > dataSet,const int numDecisionTrees, const string);
24 //NOTE:: if you are going to dynamically cast, aren't you undoing the advantage of abstraction. Why abstract at all?
25 //could cause maintenance issues later if other types of Abstract decison trees are created that cannot be cast as a decision tree.
26 // virtual ~RandomForest() {
27 // for (vector<AbstractDecisionTree*>::iterator it = decisionTrees.begin(); it != decisionTrees.end(); it++) {
28 // // we know that this is decision tree, so we can do a dynamic_case<DecisionTree*> here
29 // DecisionTree* decisionTree = dynamic_cast<DecisionTree*>(*it);
30 // // calling the destructor by deleting
31 // delete decisionTree;
35 int calcForrestErrorRate();
36 int calcForrestVariableImportance(string);
37 int populateDecisionTrees();
38 int updateGlobalOutOfBagEstimates(DecisionTree* decisionTree);