mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r890045 - in /lucene/mahout/trunk/core/src: main/java/org/apache/mahout/cf/taste/hadoop/ main/java/org/apache/mahout/cf/taste/hadoop/item/ main/java/org/apache/mahout/cf/taste/hadoop/pseudo/ main/java/org/apache/mahout/cf/taste/hadoop/slope...
Date Sun, 13 Dec 2009 11:00:47 GMT
Author: srowen
Date: Sun Dec 13 11:00:45 2009
New Revision: 890045

URL: http://svn.apache.org/viewvc?rev=890045&view=rev
Log:
Code style updates

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/AbstractJob.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/FastMap.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AverageAbsoluteDifferenceRecommenderEvaluator.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/RMSRecommenderEvaluator.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/AbstractRecommender.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/IDMigrator.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/PreferenceArray.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/HBaseBayesDatastore.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesClassifierDriver.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyConfigKeys.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansConfigKeys.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansConfigKeys.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyConfigKeys.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/StringRecordIterator.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/node/Node.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/AggregatorReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/Pattern.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestRandomSeedGenerator.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/SamplerCase.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/TestSamplingIterator.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataLoaderTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/inmem/InMemInputSplitTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/InterResultsTest.java
    lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/node/NodeTest.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/AbstractJob.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/AbstractJob.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/AbstractJob.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/AbstractJob.java Sun Dec 13 11:00:45 2009
@@ -30,8 +30,6 @@
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Writable;
-import org.apache.hadoop.io.compress.CompressionCodec;
-import org.apache.hadoop.io.compress.GzipCodec;
 import org.apache.hadoop.mapred.InputFormat;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.Mapper;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderMapper.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderMapper.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderMapper.java Sun Dec 13 11:00:45 2009
@@ -41,7 +41,6 @@
 import org.apache.mahout.matrix.Vector;
 
 import java.io.IOException;
-import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java Sun Dec 13 11:00:45 2009
@@ -103,7 +103,7 @@
     String jarFile = parsedArgs.get("--jarFile");
 
     String recommendClassName = parsedArgs.get("--recommenderClassName");
-    int recommendationsPerUser = Integer.parseInt((String) parsedArgs.get("--numRecommendations"));
+    int recommendationsPerUser = Integer.parseInt(parsedArgs.get("--numRecommendations"));
 
     JobConf jobConf = prepareJobConf(inputFile,
                                      outputPath,

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java Sun Dec 13 11:00:45 2009
@@ -23,7 +23,6 @@
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.MapReduceBase;
-import org.apache.hadoop.mapred.Mapper;
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reducer;
 import org.apache.hadoop.mapred.Reporter;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java Sun Dec 13 11:00:45 2009
@@ -23,7 +23,6 @@
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.hadoop.mapred.Reporter;
 import org.apache.hadoop.mapred.Reducer;
-import org.apache.mahout.cf.taste.hadoop.slopeone.ByItemIDComparator;
 import org.apache.mahout.cf.taste.hadoop.ItemItemWritable;
 import org.apache.mahout.cf.taste.hadoop.ItemPrefWritable;
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/FastMap.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/FastMap.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/FastMap.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/FastMap.java Sun Dec 13 11:00:45 2009
@@ -104,7 +104,6 @@
     int hashSize = keys.length;
     int jump = 1 + theHashCode % (hashSize - 2);
     int index = theHashCode % hashSize;
-    int originalIndex = index; // TODO remove
     K currentKey = keys[index];
     while (currentKey != null && (currentKey == REMOVED || !key.equals(currentKey))) {
       if (index < jump) {
@@ -112,15 +111,6 @@
       } else {
         index -= jump;
       }
-      if (index == originalIndex) {
-        // TODO remove
-        System.err.println("Bad FastMap state");
-        System.err.println("Jump: " + jump + ", size: " + keys.length + ", entries " + numEntries);
-        for (int i = 0; i < keys.length; i++) {
-          K theKey = keys[i];
-          System.err.println(theKey == REMOVED ? "REMOVED" : theKey);
-        }
-      }
       currentKey = keys[index];
     }
     return index;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AverageAbsoluteDifferenceRecommenderEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AverageAbsoluteDifferenceRecommenderEvaluator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AverageAbsoluteDifferenceRecommenderEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AverageAbsoluteDifferenceRecommenderEvaluator.java Sun Dec 13 11:00:45 2009
@@ -17,17 +17,9 @@
 
 package org.apache.mahout.cf.taste.impl.eval;
 
-import org.apache.mahout.cf.taste.common.NoSuchItemException;
-import org.apache.mahout.cf.taste.common.NoSuchUserException;
-import org.apache.mahout.cf.taste.common.TasteException;
-import org.apache.mahout.cf.taste.impl.common.FastByIDMap;
 import org.apache.mahout.cf.taste.impl.common.FullRunningAverage;
 import org.apache.mahout.cf.taste.impl.common.RunningAverage;
 import org.apache.mahout.cf.taste.model.Preference;
-import org.apache.mahout.cf.taste.model.PreferenceArray;
-import org.apache.mahout.cf.taste.recommender.Recommender;
-
-import java.util.Map;
 
 /**
  * <p>A {@link org.apache.mahout.cf.taste.eval.RecommenderEvaluator} which computes the average absolute difference

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/RMSRecommenderEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/RMSRecommenderEvaluator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/RMSRecommenderEvaluator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/RMSRecommenderEvaluator.java Sun Dec 13 11:00:45 2009
@@ -17,17 +17,9 @@
 
 package org.apache.mahout.cf.taste.impl.eval;
 
-import org.apache.mahout.cf.taste.common.NoSuchItemException;
-import org.apache.mahout.cf.taste.common.NoSuchUserException;
-import org.apache.mahout.cf.taste.common.TasteException;
-import org.apache.mahout.cf.taste.impl.common.FastByIDMap;
 import org.apache.mahout.cf.taste.impl.common.FullRunningAverage;
 import org.apache.mahout.cf.taste.impl.common.RunningAverage;
 import org.apache.mahout.cf.taste.model.Preference;
-import org.apache.mahout.cf.taste.model.PreferenceArray;
-import org.apache.mahout.cf.taste.recommender.Recommender;
-
-import java.util.Map;
 
 /**
  * <p>A {@link org.apache.mahout.cf.taste.eval.RecommenderEvaluator} which computes the "root mean squared" difference

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java Sun Dec 13 11:00:45 2009
@@ -26,7 +26,6 @@
 import org.apache.mahout.common.IOUtils;
 import org.apache.mahout.cf.taste.impl.common.LongPrimitiveIterator;
 import org.apache.mahout.cf.taste.impl.common.Retriever;
-import org.apache.mahout.cf.taste.impl.common.SkippingIterator;
 import org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent;
 import org.apache.mahout.cf.taste.impl.model.GenericItemPreferenceArray;
 import org.apache.mahout.cf.taste.impl.model.GenericPreference;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/AbstractRecommender.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/AbstractRecommender.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/AbstractRecommender.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/AbstractRecommender.java Sun Dec 13 11:00:45 2009
@@ -44,7 +44,8 @@
 
   /**
    * <p>Default implementation which just calls {@link Recommender#recommend(long, int,
-   * org.apache.mahout.cf.taste.recommender.Rescorer)}, with a {@link org.apache.mahout.cf.taste.recommender.Rescorer}
+   * org.apache.mahout.cf.taste.recommender.IDRescorer)},
+   * with a {@link org.apache.mahout.cf.taste.recommender.Rescorer}
    * that does nothing.</p>
    */
   @Override

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java Sun Dec 13 11:00:45 2009
@@ -31,7 +31,6 @@
 import org.apache.mahout.cf.taste.model.DataModel;
 import org.apache.mahout.cf.taste.recommender.ClusteringRecommender;
 import org.apache.mahout.cf.taste.recommender.RecommendedItem;
-import org.apache.mahout.cf.taste.recommender.Rescorer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java Sun Dec 13 11:00:45 2009
@@ -30,7 +30,6 @@
 import org.apache.mahout.cf.taste.model.DataModel;
 import org.apache.mahout.cf.taste.recommender.ClusteringRecommender;
 import org.apache.mahout.cf.taste.recommender.RecommendedItem;
-import org.apache.mahout.cf.taste.recommender.Rescorer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/IDMigrator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/IDMigrator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/IDMigrator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/IDMigrator.java Sun Dec 13 11:00:45 2009
@@ -47,7 +47,7 @@
    *  The reverse mapping is also stored.
    * @throws TasteException if an error occurs while storing the mapping
    */
-  long toLongID(String stringID) throws TasteException;
+  long toLongID(String stringID);
 
   /**
    * @return the string ID most recently associated with the given long ID, or null if doesn't exist

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/PreferenceArray.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/PreferenceArray.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/PreferenceArray.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/PreferenceArray.java Sun Dec 13 11:00:45 2009
@@ -55,7 +55,7 @@
    * Sets user ID for preference at i.
    *
    * @param i index
-   * @param value new user ID
+   * @param userID new user ID
    */
   void setUserID(int i, long userID);
 
@@ -69,7 +69,7 @@
    * Sets item ID for preference at i.
    *
    * @param i index
-   * @param value new item ID
+   * @param itemID new item ID
    */
   void setItemID(int i, long itemID);
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/HBaseBayesDatastore.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/HBaseBayesDatastore.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/HBaseBayesDatastore.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/HBaseBayesDatastore.java Sun Dec 13 11:00:45 2009
@@ -125,11 +125,12 @@
           BayesConstants.LABEL_THETA_NORMALIZER, label)));
     }
     for (String label : labels) {
-      System.out.println(label + ' '
-          + getWeightFromHbase(BayesConstants.LABEL_THETA_NORMALIZER, label)
-          + ' ' + thetaNormalizer + ' '
-          + getWeightFromHbase(BayesConstants.LABEL_THETA_NORMALIZER, label)
-          / thetaNormalizer);
+      log.info("{} {} {} {}", new Object[] {
+               label,
+               getWeightFromHbase(BayesConstants.LABEL_THETA_NORMALIZER, label),
+               thetaNormalizer,
+               getWeightFromHbase(BayesConstants.LABEL_THETA_NORMALIZER, label)
+                 / thetaNormalizer});
     }
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/datastore/InMemoryBayesDatastore.java Sun Dec 13 11:00:45 2009
@@ -29,9 +29,13 @@
 import org.apache.mahout.classifier.bayes.interfaces.Datastore;
 import org.apache.mahout.classifier.bayes.io.SequenceFileModelReader;
 import org.apache.mahout.common.Parameters;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class InMemoryBayesDatastore implements Datastore {
 
+  private static final Logger log = LoggerFactory.getLogger(InMemoryBayesDatastore.class);
+
   private final Map<String, Map<String, Map<String, Double>>> matrices = new HashMap<String, Map<String, Map<String, Double>>>();
 
   private final Map<String, Map<String, Double>> vectors = new HashMap<String, Map<String, Double>>();
@@ -77,9 +81,11 @@
           "thetaNormalizer", label)));
     }
     for (String label : labels) {
-      System.out.println(label + ' ' + vectorGetCell("thetaNormalizer", label)
-          + ' ' + thetaNormalizer + ' '
-          + vectorGetCell("thetaNormalizer", label) / thetaNormalizer);
+      log.info("{} {} {} {}", new Object[] {
+               label,
+               vectorGetCell("thetaNormalizer", label),
+               thetaNormalizer,
+               vectorGetCell("thetaNormalizer", label) / thetaNormalizer});
     }
   }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesClassifierDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesClassifierDriver.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesClassifierDriver.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesClassifierDriver.java Sun Dec 13 11:00:45 2009
@@ -51,7 +51,7 @@
    * 
    * @param params The Job parameters containing the gramSize, input output folders, defaultCat, encoding
    */
-  public static final void runJob(BayesParameters params) throws IOException {
+  public static void runJob(BayesParameters params) throws IOException {
     JobClient client = new JobClient();
     JobConf conf = new JobConf(BayesClassifierDriver.class);
     conf.setJobName("Bayes Classifier Driver running over input: " + params.get("testDirPath"));

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/bayes/BayesDriver.java Sun Dec 13 11:00:45 2009
@@ -44,7 +44,8 @@
    * @throws InterruptedException 
    */
   @Override
-  public void runJob(String input, String output, BayesParameters params) throws IOException, InterruptedException, ClassNotFoundException {
+  public void runJob(String input, String output, BayesParameters params)
+      throws IOException, InterruptedException, ClassNotFoundException {
     JobConf conf = new JobConf(BayesDriver.class);
     Path outPath = new Path(output);
     FileSystem dfs = FileSystem.get(outPath.toUri(), conf);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyConfigKeys.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyConfigKeys.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyConfigKeys.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyConfigKeys.java Sun Dec 13 11:00:45 2009
@@ -1,11 +1,28 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.mahout.clustering.canopy;
 
-public class CanopyConfigKeys {
+public interface CanopyConfigKeys {
 
-	public static final String T1_KEY = "org.apache.mahout.clustering.canopy.t1";
-	public static final String CANOPY_PATH_KEY = "org.apache.mahout.clustering.canopy.path";
-	public static final String T2_KEY = "org.apache.mahout.clustering.canopy.t2";
+	String T1_KEY = "org.apache.mahout.clustering.canopy.t1";
+	String CANOPY_PATH_KEY = "org.apache.mahout.clustering.canopy.path";
+	String T2_KEY = "org.apache.mahout.clustering.canopy.t2";
 	// keys used by Driver, Mapper, Combiner & Reducer
-	  public static final String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.canopy.measure";
+	String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.canopy.measure";
 
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansConfigKeys.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansConfigKeys.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansConfigKeys.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansConfigKeys.java Sun Dec 13 11:00:45 2009
@@ -1,10 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.mahout.clustering.fuzzykmeans;
 
-public class FuzzyKMeansConfigKeys {
+public interface FuzzyKMeansConfigKeys {
 
-  public static final String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.kmeans.measure";
-  public static final String CLUSTER_PATH_KEY = "org.apache.mahout.clustering.kmeans.path";
-  public static final String CLUSTER_CONVERGENCE_KEY = "org.apache.mahout.clustering.kmeans.convergence";
-  public static final String M_KEY = "org.apache.mahout.clustering.fuzzykmeans.m";
+  String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.kmeans.measure";
+  String CLUSTER_PATH_KEY = "org.apache.mahout.clustering.kmeans.path";
+  String CLUSTER_CONVERGENCE_KEY = "org.apache.mahout.clustering.kmeans.convergence";
+  String M_KEY = "org.apache.mahout.clustering.fuzzykmeans.m";
 
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansMapper.java Sun Dec 13 11:00:45 2009
@@ -37,7 +37,7 @@
 
   private static final Logger log = LoggerFactory.getLogger(FuzzyKMeansMapper.class);
 
-  private List<SoftCluster> clusters = new ArrayList<SoftCluster>();
+  private final List<SoftCluster> clusters = new ArrayList<SoftCluster>();
   private FuzzyKMeansClusterer clusterer; 
   
   @Override

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java Sun Dec 13 11:00:45 2009
@@ -23,6 +23,8 @@
 import org.apache.hadoop.mapred.OutputCollector;
 import org.apache.mahout.common.distance.DistanceMeasure;
 import org.apache.mahout.matrix.Vector;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements the k-means clustering algorithm. It uses
@@ -31,6 +33,8 @@
  * */
 public class KMeansClusterer {
 
+  private static final Logger log = LoggerFactory.getLogger(KMeansClusterer.class);
+
   /** Distance to use for point to cluster comparison. */
   private final DistanceMeasure measure;
 
@@ -39,11 +43,9 @@
    * 
    * @param measure
    *          The distance measure to use for comparing clusters against points.
-   * @param convergenceDelta
-   *          When do we define a cluster to have converged?
    * 
-   * */
-  public KMeansClusterer(final DistanceMeasure measure) {
+   */
+  public KMeansClusterer(DistanceMeasure measure) {
     this.measure = measure;
   }
 
@@ -65,7 +67,7 @@
       Vector clusterCenter = cluster.getCenter();
       double distance = this.measure.distance(clusterCenter.getLengthSquared(),
           clusterCenter, point);
-      System.out.println(distance + " Cluster: " + cluster.getId());
+      log.info("{} Cluster: {}", distance, cluster.getId());
       if (distance < nearestDistance || nearestCluster == null) {
         nearestCluster = cluster;
         nearestDistance = distance;
@@ -90,8 +92,7 @@
     }
     
     String name = point.getName();
-    String key = new String(name != null && name.length() != 0 ? name : point
-        .asFormatString());
+    String key = name != null && name.length() != 0 ? name : point.asFormatString();
     output.collect(new Text(key), new Text(String.valueOf(nearestCluster.getId())));
   }
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansConfigKeys.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansConfigKeys.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansConfigKeys.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansConfigKeys.java Sun Dec 13 11:00:45 2009
@@ -1,16 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.mahout.clustering.kmeans;
 
 /**
  * This class holds all config keys that are relevant to be used in the KMeans MapReduce JobConf.
  * */
-public class KMeansConfigKeys {
+public interface KMeansConfigKeys {
   /** Configuration key for distance measure to use. */
-  public static final String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.kmeans.measure";
+  String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.kmeans.measure";
   /** Configuration key for convergence threshold. */
-  public static final String CLUSTER_CONVERGENCE_KEY = "org.apache.mahout.clustering.kmeans.convergence";
+  String CLUSTER_CONVERGENCE_KEY = "org.apache.mahout.clustering.kmeans.convergence";
   /** Configuration key for ?? */
-  public static final String CLUSTER_PATH_KEY = "org.apache.mahout.clustering.kmeans.path";
+  String CLUSTER_PATH_KEY = "org.apache.mahout.clustering.kmeans.path";
   /** The number of iterations that have taken place */
-  public static final String ITERATION_NUMBER = "org.apache.mahout.clustering.kmeans.iteration";
+  String ITERATION_NUMBER = "org.apache.mahout.clustering.kmeans.iteration";
   
 }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansMapper.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansMapper.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansMapper.java Sun Dec 13 11:00:45 2009
@@ -28,7 +28,6 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 
 public class KMeansMapper extends MapReduceBase implements

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java Sun Dec 13 11:00:45 2009
@@ -21,7 +21,6 @@
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
 import org.apache.mahout.clustering.ClusterBase;
-import org.apache.mahout.common.distance.EuclideanDistanceMeasure;
 import org.apache.mahout.matrix.AbstractVector;
 import org.apache.mahout.matrix.CardinalityException;
 import org.apache.mahout.matrix.DenseVector;

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java Sun Dec 13 11:00:45 2009
@@ -105,8 +105,8 @@
   }
 
   /** Emit the new canopy to the collector, keyed by the canopy's Id */
-  void emitCanopy(MeanShiftCanopy canopy,
-                  OutputCollector<Text, WritableComparable<?>> collector)
+  static void emitCanopy(MeanShiftCanopy canopy,
+                         OutputCollector<Text, WritableComparable<?>> collector)
       throws IOException {
     String identifier = canopy.getIdentifier();
     collector.collect(new Text(identifier), new Text("new " + canopy.toString()));
@@ -115,7 +115,7 @@
   /**
    * Shift the center to the new centroid of the cluster
    *
-   * @param the canopy to shift.
+   * @param canopy the canopy to shift.
    * @return if the cluster is converged
    */
   public boolean shiftToMean(MeanShiftCanopy canopy) {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyConfigKeys.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyConfigKeys.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyConfigKeys.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyConfigKeys.java Sun Dec 13 11:00:45 2009
@@ -1,6 +1,6 @@
 package org.apache.mahout.clustering.meanshift;
 
-public class MeanShiftCanopyConfigKeys {
+public interface MeanShiftCanopyConfigKeys {
 
   // keys used by Driver, Mapper, Combiner & Reducer
   public static final String DISTANCE_MEASURE_KEY = "org.apache.mahout.clustering.canopy.measure";

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/StringRecordIterator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/StringRecordIterator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/StringRecordIterator.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/common/StringRecordIterator.java Sun Dec 13 11:00:45 2009
@@ -24,13 +24,14 @@
 
 public class StringRecordIterator implements Iterator<List<String>> {
  
-  private Iterator<String> lineIterator;
+  private final Iterator<String> lineIterator;
   private Pattern splitter = null;
-  public StringRecordIterator(FileLineIterable iterable, String pattern)
-  {
+
+  public StringRecordIterator(FileLineIterable iterable, String pattern) {
     this.lineIterator = iterable.iterator();
     this.splitter = Pattern.compile(pattern);
   }
+
   @Override
   public boolean hasNext() {
     return lineIterator.hasNext();

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/Builder.java Sun Dec 13 11:00:45 2009
@@ -66,9 +66,6 @@
 
   private String outputDirName = "output";
 
-  private int numTrees;
-
-
   protected TreeBuilder getTreeBuilder() {
     return treeBuilder;
   }
@@ -285,7 +282,7 @@
 
   public DecisionForest build(int nbTrees, PredictionCallback callback)
       throws IOException, ClassNotFoundException, InterruptedException {
-    numTrees = getNbTrees(conf);
+    int numTrees = getNbTrees(conf);
 
     Path outputPath = getOutputPath(conf);
     FileSystem fs = outputPath.getFileSystem(conf);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java Sun Dec 13 11:00:45 2009
@@ -73,14 +73,13 @@
       for (int index = 0; index < numTrees; index++) {
         key.readFields(in);
 
-        if (key.partition() != partition) {
+        if (key.partition() == partition) {
+          // skip the trees of the current partition
+          Node.read(in);
+        } else {
           keys[current] = key.clone();
           trees[current] = Node.read(in);
-
           current++;
-        } else {
-          // skip the trees of the current partition
-          Node.read(in);
         }
       }
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/node/Node.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/node/Node.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/node/Node.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/node/Node.java Sun Dec 13 11:00:45 2009
@@ -29,8 +29,6 @@
  */
 public abstract class Node implements Writable {
 
-  //protected static final String DELIMITER = ",";
-
   protected enum NODE_TYPE {
     MOCKLEAF, LEAF, NUMERICAL, CATEGORICAL
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java Sun Dec 13 11:00:45 2009
@@ -99,7 +99,7 @@
 
       runTool(dataPath, descriptor, descPath);
     } catch (OptionException e) {
-      System.err.println("Exception : " + e);
+      log.warn(e.toString(), e);
       CommandLineUtil.printHelp(group);
     }
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/AggregatorReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/AggregatorReducer.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/AggregatorReducer.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/AggregatorReducer.java Sun Dec 13 11:00:45 2009
@@ -22,7 +22,6 @@
 import org.apache.mahout.common.Parameters;
 import org.apache.mahout.fpm.pfpgrowth.convertors.string.TopKStringPatterns;
 import java.io.IOException;
-import java.util.Iterator;
 
 /**
  * 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/FPGrowth.java Sun Dec 13 11:00:45 2009
@@ -418,7 +418,7 @@
     return frequentPatterns;
   }
 
-  private FrequentPatternMaxHeap growthTopDown(FPTree tree,
+  private static FrequentPatternMaxHeap growthTopDown(FPTree tree,
       MutableLong minSupportMutable, int K, FPTreeDepthCache treeCache,
       int level, boolean conditionalOfCurrentAttribute, int currentAttribute) {
     FrequentPatternMaxHeap frequentPatterns = new FrequentPatternMaxHeap(K);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/Pattern.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/Pattern.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/Pattern.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/fpm/pfpgrowth/fpgrowth/Pattern.java Sun Dec 13 11:00:45 2009
@@ -71,9 +71,7 @@
       return false;
     if (support != other.support)
       return false;
-    if (!Arrays.equals(pattern, other.pattern))
-      return false;
-    return true;
+    return Arrays.equals(pattern, other.pattern);
   }
 
   public final int[] getPattern() {

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestRandomSeedGenerator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestRandomSeedGenerator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestRandomSeedGenerator.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/clustering/kmeans/TestRandomSeedGenerator.java Sun Dec 13 11:00:45 2009
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.mahout.clustering.kmeans;
 
 import java.io.File;
@@ -6,6 +23,7 @@
 import java.util.List;
 import java.util.Set;
 
+import junit.framework.Assert;
 import junit.framework.TestCase;
 
 import org.apache.hadoop.conf.Configuration;
@@ -23,7 +41,7 @@
   static final double[][] raw = {{1, 1}, {2, 1}, {1, 2}, {2, 2},
     {3, 3}, {4, 4}, {5, 4}, {4, 5}, {5, 5}};
   
-  FileSystem fs;
+  private FileSystem fs;
   
   private static List<Vector> getPoints(double[][] raw) {
     List<Vector> points = new ArrayList<Vector>();
@@ -49,6 +67,7 @@
     }
   }
   
+  @Override
   public void setUp() throws Exception {
     super.setUp();
     rmr("testdata");
@@ -83,19 +102,19 @@
     while (reader.next(key, value)) {
       clusterCount++;
       int id = value.getId();
-      TestCase.assertTrue(set.add(id)); // validate unique id's
+      Assert.assertTrue(set.add(id)); // validate unique id's
       
       Vector v = value.getCenter();
       assertVectorEquals(raw[id], v); // validate values match
     }
-    
-    TestCase.assertEquals(4, clusterCount); // validate sample count
+
+    Assert.assertEquals(4, clusterCount); // validate sample count
   }
   
-  public void assertVectorEquals(double[] raw, Vector v) {
-    TestCase.assertEquals(raw.length, v.size());
+  public static void assertVectorEquals(double[] raw, Vector v) {
+    Assert.assertEquals(raw.length, v.size());
     for (int i=0; i < raw.length; i++) {
-      TestCase.assertEquals(raw[i], v.getQuick(i));
+      Assert.assertEquals(raw[i], v.getQuick(i));
     }
   }
 }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/SamplerCase.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/SamplerCase.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/SamplerCase.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/SamplerCase.java Sun Dec 13 11:00:45 2009
@@ -32,6 +32,7 @@
 
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
   }
 

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/TestSamplingIterator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/TestSamplingIterator.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/TestSamplingIterator.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/common/iterator/TestSamplingIterator.java Sun Dec 13 11:00:45 2009
@@ -27,6 +27,7 @@
 
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
   }
 

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataLoaderTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataLoaderTest.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataLoaderTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataLoaderTest.java Sun Dec 13 11:00:45 2009
@@ -35,6 +35,7 @@
 
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
     rng = RandomUtils.getRandom();
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataTest.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/data/DataTest.java Sun Dec 13 11:00:45 2009
@@ -38,6 +38,7 @@
 
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
     rng = RandomUtils.getRandom();
     data = Utils.randomData(rng, nbAttributes, datasize);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/inmem/InMemInputSplitTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/inmem/InMemInputSplitTest.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/inmem/InMemInputSplitTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/inmem/InMemInputSplitTest.java Sun Dec 13 11:00:45 2009
@@ -40,6 +40,7 @@
   
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
     rng = RandomUtils.getRandom();
 

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/InterResultsTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/InterResultsTest.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/InterResultsTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/InterResultsTest.java Sun Dec 13 11:00:45 2009
@@ -53,6 +53,7 @@
 
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
     Random rng = RandomUtils.getRandom();
 
@@ -70,7 +71,7 @@
     // prepare first step output
     keys = new TreeID[nbTrees];
     trees = new Node[nbTrees];
-    
+
     int treeIndex = 0;
     for (int partition = 0; partition < nbMappers; partition++) {
       int nbMapTrees = Step1Mapper.nbTrees(nbMappers, nbTrees, partition);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/node/NodeTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/node/NodeTest.java?rev=890045&r1=890044&r2=890045&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/node/NodeTest.java (original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/node/NodeTest.java Sun Dec 13 11:00:45 2009
@@ -39,8 +39,9 @@
   
   @Override
   protected void setUp() throws Exception {
+    super.setUp();
     RandomUtils.useTestSeed();
-    
+
     rng = RandomUtils.getRandom();
 
     byteOutStream = new ByteArrayOutputStream();



Mime
View raw message