]> git.donarmstrong.com Git - mothur.git/blobdiff - rftreenode.hpp
changed random forest output filename
[mothur.git] / rftreenode.hpp
index 8987ebcec58b04d8eaaff87e86f514887a4bfd17..d53cc2b614db5b1e9e8d8626127cd58d14bb0c0e 100755 (executable)
@@ -6,8 +6,8 @@
 //  Copyright (c) 2012 Schloss Lab. All rights reserved.
 //
 
-#ifndef rrf_fs_prototype_treenode_hpp
-#define rrf_fs_prototype_treenode_hpp
+#ifndef RF_RFTREENODE_HPP
+#define RF_RFTREENODE_HPP
 
 #include "mothurout.h"
 #include "macros.h"
@@ -16,7 +16,14 @@ class RFTreeNode{
     
 public:
     
-    RFTreeNode(vector< vector<int> > bootstrappedTrainingSamples, vector<int> globalDiscardedFeatureIndices, int numFeatures, int numSamples, int numOutputClasses, int generation);
+    RFTreeNode(vector< vector<int> > bootstrappedTrainingSamples,
+               vector<int> globalDiscardedFeatureIndices,
+               int numFeatures,
+               int numSamples,
+               int numOutputClasses,
+               int generation,
+               int nodeId,
+               float featureStandardDeviationThreshold = 0.0);
     
     virtual ~RFTreeNode(){}
     
@@ -41,6 +48,7 @@ public:
     const vector<int>& getBootstrappedOutputVector() { return bootstrappedOutputVector; }
     const vector<int>& getFeatureSubsetIndices() { return featureSubsetIndices; }
     const double getOwnEntropy() { return ownEntropy; }
+    const int getTestSampleMisclassificationCount() { return testSampleMisclassificationCount; }
     
     // setters
     void setIsLeaf(bool isLeaf) { this->isLeaf = isLeaf; }
@@ -77,6 +85,10 @@ private:
     double splitFeatureEntropy;
     double ownEntropy;
     
+    int nodeId;
+    float featureStandardDeviationThreshold;
+    int testSampleMisclassificationCount;
+    
     RFTreeNode* leftChildNode;
     RFTreeNode* rightChildNode;
     RFTreeNode* parentNode;