X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=randomforest.cpp;h=acf87dfebcd022d37cf6974f8331c7ad940a017a;hp=6f40b7c1361b3f366cca5971eeb709b0119b2240;hb=499f4ac6e321f9f03d4c3aa25c3b6880892c8b83;hpb=69cb74767d8f15d7715653b6eb2119e15b335977 diff --git a/randomforest.cpp b/randomforest.cpp index 6f40b7c..acf87df 100644 --- a/randomforest.cpp +++ b/randomforest.cpp @@ -122,11 +122,7 @@ int RandomForest::getMissclassifications(string filename, map 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 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;