]> git.donarmstrong.com Git - mothur.git/blobdiff - classifysharedcommand.cpp
adding pretty confusion matrix
[mothur.git] / classifysharedcommand.cpp
index d9864b94e6eb43f0cba337175907edc65db63271..c79e0e8f2aefcc39c7358fd7040681a8e0e7f924 100755 (executable)
@@ -22,9 +22,9 @@ vector<string> ClassifySharedCommand::setParameters(){
                CommandParameter pnumtrees("numtrees", "Number", "", "100", "", "", "","",false,false); parameters.push_back(pnumtrees);
         
             // parameters related to pruning
-        CommandParameter pdopruning("prune", "Boolean", "", "F", "", "", "", "", false, false); parameters.push_back(pdopruning);
+        CommandParameter pdopruning("prune", "Boolean", "", "T", "", "", "", "", false, false); parameters.push_back(pdopruning);
         CommandParameter ppruneaggrns("pruneaggressiveness", "Number", "", "0.9", "", "", "", "", false, false); parameters.push_back(ppruneaggrns);
-        CommandParameter pdiscardhetrees("discarderrortrees", "Boolean", "", "F", "", "", "", "", false, false); parameters.push_back(pdiscardhetrees);
+        CommandParameter pdiscardhetrees("discarderrortrees", "Boolean", "", "T", "", "", "", "", false, false); parameters.push_back(pdiscardhetrees);
         CommandParameter phetdiscardthreshold("errorthreshold", "Number", "", "0.4", "", "", "", "", false, false); parameters.push_back(phetdiscardthreshold);
         CommandParameter psdthreshold("stdthreshold", "Number", "", "0.0", "", "", "", "", false, false); parameters.push_back(psdthreshold);
             // pruning params end
@@ -375,9 +375,10 @@ void ClassifySharedCommand::processSharedAndDesignData(vector<SharedRAbundVector
         
         randomForest.populateDecisionTrees();
         randomForest.calcForrestErrorRate();
+        randomForest.printConfusionMatrix(intToTreatmentMap);
         
         map<string, string> variables; 
-        variables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(sharedfile));
+        variables["[filename]"] = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + "RF.";
         variables["[distance]"] = lookup[0]->getLabel();
         string filename = getOutputFileName("summary", variables);
         outputNames.push_back(filename); outputTypes["summary"].push_back(filename);