mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robina...@apache.org
Subject svn commit: r911434 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
Date Thu, 18 Feb 2010 15:14:44 GMT
Author: robinanil
Date: Thu Feb 18 15:14:44 2010
New Revision: 911434

URL: http://svn.apache.org/viewvc?rev=911434&view=rev
Log:
MAHOUT-296 Style issues with TestClassifier

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java?rev=911434&r1=911433&r2=911434&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
Thu Feb 18 15:14:44 2010
@@ -256,20 +256,21 @@
             boolean correct = resultAnalyzer.addInstance(correctLabel, classifiedLabel);
             if (verbose) {
               // We have one document per line
-              log.info(
-                "Line Number: {} Line(30): {} Expected Label: {} Classified Label: {} Correct:
{}",
+              log.info("Line Number: {} Line(30): {} Expected Label: {} Classified Label:
{} Correct: {}",
                 new Object[] {lineNum, line.length() > 30 ? line.substring(0, 30) : line,
correctLabel,
                               classifiedLabel.getLabel(), correct,});
             }
-            //log.info("{} {}", correctLabel, classifiedLabel);
+            // log.info("{} {}", correctLabel, classifiedLabel);
             
           }
           lineNum++;
         }
-       /*log.info("{}\t{}\t{}/{}",
-          new Object[] {correctLabel, resultAnalyzer.getConfusionMatrix().getAccuracy(correctLabel),
-                        resultAnalyzer.getConfusionMatrix().getCorrect(correctLabel),
-                        resultAnalyzer.getConfusionMatrix().getTotal(correctLabel)});*/
+        /*
+         * log.info("{}\t{}\t{}/{}", new Object[] {correctLabel,
+         * resultAnalyzer.getConfusionMatrix().getAccuracy(correctLabel),
+         * resultAnalyzer.getConfusionMatrix().getCorrect(correctLabel),
+         * resultAnalyzer.getConfusionMatrix().getTotal(correctLabel)});
+         */
         log.info("Classified instances from {}", file.getName());
         if (verbose) {
           log.info("Performance stats {}", operationStats.toString());
@@ -277,8 +278,10 @@
       }
       
     }
-   log.info("{}", totalStatistics.toString());
-   log.info(resultAnalyzer.summarize());
+    if (verbose) {
+      log.info("{}", totalStatistics.toString());
+    }
+    log.info(resultAnalyzer.summarize());
   }
   
   public static void classifyParallel(BayesParameters params) throws IOException {



Mime
View raw message