]> git.donarmstrong.com Git - mothur.git/blob - regularizedrandomforest.cpp
fixes while testing 1.33.0
[mothur.git] / regularizedrandomforest.cpp
1 //
2 //  regularizedrandomforest.cpp
3 //  Mothur
4 //
5 //  Created by Kathryn Iverson on 11/16/12.
6 //  Copyright (c) 2012 Schloss Lab. All rights reserved.
7 //
8
9 #include "regularizedrandomforest.h"
10
11 RegularizedRandomForest::RegularizedRandomForest(const vector <vector<int> > dataSet,
12                                                  const int numDecisionTrees,
13                                                  const string treeSplitCriterion = "gainratio")
14                         // TODO: update ctor according to basic RandomForest Class
15                       : Forest(dataSet,
16                                numDecisionTrees,
17                                treeSplitCriterion,
18                                false, 0.9, true, 0.4, "log2", 0.0) {
19     m = MothurOut::getInstance();
20 }
21
22 int RegularizedRandomForest::calcForrestErrorRate() {
23     //
24     try {
25         return 0;
26     }
27     catch(exception& e) {
28                 m->errorOut(e, "RegularizedRandomForest", "calcForrestErrorRate");
29                 exit(1);
30         }
31 }
32
33 int RegularizedRandomForest::calcForrestVariableImportance(string filename) {
34     //
35     try {
36         return 0;
37     }
38     catch(exception& e) {
39                 m->errorOut(e, "RegularizedRandomForest", "calcForrestVariableImportance");
40                 exit(1);
41         }
42 }
43
44 int RegularizedRandomForest::populateDecisionTrees() {
45     //
46     try {
47         return 0;
48     }
49     catch(exception& e) {
50                 m->errorOut(e, "RegularizedRandomForest", "populateDecisionTrees");
51                 exit(1);
52         }
53 }
54
55 int RegularizedRandomForest::updateGlobalOutOfBagEstimates(DecisionTree *decisionTree) {
56     try {
57         return 0;
58     }
59     catch(exception& e) {
60                 m->errorOut(e, "RegularizedRandomForest", "updateGlobalOutOfBagEstimates");
61                 exit(1);
62         }
63 }