]> git.donarmstrong.com Git - mothur.git/blobdiff - randomforest.cpp
adding labels to list file.
[mothur.git] / randomforest.cpp
index 6f40b7c1361b3f366cca5971eeb709b0119b2240..acf87dfebcd022d37cf6974f8331c7ad940a017a 100644 (file)
@@ -122,11 +122,7 @@ int RandomForest::getMissclassifications(string filename, map<int, string> intTo
             int realOutcome = dataSet[indexOfSample][numFeatures];
                                    
             if (majorityVotedOutcome != realOutcome) {             
-                //write to file
-                //dataSet[indexOfSample][];
-                
                 out << names[indexOfSample] << "\t" << intToTreatmentMap[majorityVotedOutcome] << "\t" << intToTreatmentMap[realOutcome] << endl;
-                //out << m->currentBinLabels[(int)globalVariableRanks[i].first] << '\t' << globalVariableImportanceList[globalVariableRanks[i].first] << endl;
                                 
             }
         }
@@ -135,7 +131,7 @@ int RandomForest::getMissclassifications(string filename, map<int, string> intTo
         return 0;
     }
        catch(exception& e) {
-               m->errorOut(e, "RandomForest", "calcForrestErrorRate");
+               m->errorOut(e, "RandomForest", "getMissclassifications");
                exit(1);
        } 
 }
@@ -184,7 +180,7 @@ int RandomForest::calcForrestVariableImportance(string filename) {
         m->openOutputFile(filename, out);
         out <<"OTU\tMean decrease accuracy\n";
         for (int i = 0; i < globalVariableRanks.size(); i++) {
-            out << m->currentBinLabels[(int)globalVariableRanks[i].first] << '\t' << globalVariableImportanceList[globalVariableRanks[i].first] << endl;
+            out << m->currentSharedBinLabels[(int)globalVariableRanks[i].first] << '\t' << globalVariableImportanceList[globalVariableRanks[i].first] << endl;
         }
         out.close();
         return 0;