From: kdiverson <> Date: Wed, 11 Sep 2013 18:41:27 +0000 (-0400) Subject: adding misclassification output file X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=c2ea82d80aeeef439d13cfad02e210ea0496e6d0 adding misclassification output file --- diff --git a/classifysharedcommand.cpp b/classifysharedcommand.cpp index c79e0e8..c7eb6cd 100755 --- a/classifysharedcommand.cpp +++ b/classifysharedcommand.cpp @@ -359,8 +359,11 @@ void ClassifySharedCommand::processSharedAndDesignData(vector > dataSet(numRows, vector(numColumns, 0)); + vector names; + for (int i = 0; i < lookup.size(); i++) { string sharedGroupName = lookup[i]->getGroup(); + names.push_back(sharedGroupName); string treatmentName = designMap.getGroup(sharedGroupName); int j = 0; @@ -382,9 +385,17 @@ void ClassifySharedCommand::processSharedAndDesignData(vectorgetLabel(); string filename = getOutputFileName("summary", variables); outputNames.push_back(filename); outputTypes["summary"].push_back(filename); - randomForest.calcForrestVariableImportance(filename); + // + map variable; + variable["[filename]"] = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + "misclassifications."; + variable["[distance]"] = lookup[0]->getLabel(); + string mc_filename = getOutputFileName("summary", variable); + outputNames.push_back(mc_filename); outputTypes["summary"].push_back(mc_filename); + randomForest.getMissclassifications(mc_filename, intToTreatmentMap, names); + // + m->mothurOutEndLine(); } catch(exception& e) {