mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeast...@apache.org
Subject svn commit: r1003067 - in /mahout/trunk: examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/ examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/ examples/src/main/java/org/apache/mahout/clustering/sy...
Date Thu, 30 Sep 2010 14:05:39 GMT
Author: jeastman
Date: Thu Sep 30 14:05:38 2010
New Revision: 1003067

URL: http://svn.apache.org/viewvc?rev=1003067&view=rev
Log:
Moved input conversion drivers from examples to utils as they have general utility outside
of the examples

Added:
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputDriver.java
      - copied, changed from r1002835, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputDriver.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputMapper.java
      - copied, changed from r1002836, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputDriver.java
      - copied, changed from r1002835, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputDriver.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputMapper.java
      - copied, changed from r1002836, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java
Removed:
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputDriver.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputDriver.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java
Modified:
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/Job.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/fuzzykmeans/Job.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/Job.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/Job.java?rev=1003067&r1=1003066&r2=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/Job.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/Job.java
Thu Sep 30 14:05:38 2010
@@ -24,6 +24,7 @@ import org.apache.hadoop.conf.Configurat
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.clustering.canopy.CanopyDriver;
+import org.apache.mahout.clustering.conversion.InputDriver;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java?rev=1003067&r1=1003066&r2=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/Job.java
Thu Sep 30 14:05:38 2010
@@ -31,13 +31,13 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.clustering.Model;
 import org.apache.mahout.clustering.ModelDistribution;
+import org.apache.mahout.clustering.conversion.InputDriver;
 import org.apache.mahout.clustering.dirichlet.DirichletCluster;
 import org.apache.mahout.clustering.dirichlet.DirichletDriver;
 import org.apache.mahout.clustering.dirichlet.DirichletMapper;
 import org.apache.mahout.clustering.dirichlet.models.AbstractVectorModelDistribution;
 import org.apache.mahout.clustering.dirichlet.models.GaussianClusterDistribution;
 import org.apache.mahout.clustering.dirichlet.models.NormalModelDistribution;
-import org.apache.mahout.clustering.syntheticcontrol.canopy.InputDriver;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/fuzzykmeans/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/fuzzykmeans/Job.java?rev=1003067&r1=1003066&r2=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/fuzzykmeans/Job.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/fuzzykmeans/Job.java
Thu Sep 30 14:05:38 2010
@@ -28,8 +28,8 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.clustering.Cluster;
 import org.apache.mahout.clustering.canopy.CanopyDriver;
+import org.apache.mahout.clustering.conversion.InputDriver;
 import org.apache.mahout.clustering.fuzzykmeans.FuzzyKMeansDriver;
-import org.apache.mahout.clustering.syntheticcontrol.canopy.InputDriver;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/Job.java?rev=1003067&r1=1003066&r2=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/Job.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/kmeans/Job.java
Thu Sep 30 14:05:38 2010
@@ -26,8 +26,8 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.clustering.Cluster;
 import org.apache.mahout.clustering.canopy.CanopyDriver;
+import org.apache.mahout.clustering.conversion.InputDriver;
 import org.apache.mahout.clustering.kmeans.KMeansDriver;
-import org.apache.mahout.clustering.syntheticcontrol.canopy.InputDriver;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;
 import org.apache.mahout.common.commandline.DefaultOptionCreator;

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java?rev=1003067&r1=1003066&r2=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/Job.java
Thu Sep 30 14:05:38 2010
@@ -25,6 +25,7 @@ import org.apache.commons.cli2.builder.D
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.util.ToolRunner;
+import org.apache.mahout.clustering.conversion.meanshift.InputDriver;
 import org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver;
 import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.common.HadoopUtil;

Copied: mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputDriver.java
(from r1002835, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputDriver.java)
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputDriver.java?p2=mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputDriver.java&p1=mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputDriver.java&r1=1002835&r2=1003067&rev=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputDriver.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputDriver.java
Thu Sep 30 14:05:38 2010
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.mahout.clustering.syntheticcontrol.canopy;
+package org.apache.mahout.clustering.conversion;
 
 import java.io.IOException;
 
@@ -40,6 +40,12 @@ import org.apache.mahout.math.VectorWrit
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * This class converts text files containing space-delimited floating point numbers into
+ * Mahout sequence files of VectorWritable suitable for input to the clustering jobs in
+ * particular, and any Mahout job requiring this input in general.
+ *
+ */
 public final class InputDriver {
 
   private static final Logger log = LoggerFactory.getLogger(InputDriver.class);

Copied: mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputMapper.java
(from r1002836, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java)
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputMapper.java?p2=mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputMapper.java&p1=mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java&r1=1002836&r2=1003067&rev=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/canopy/InputMapper.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/InputMapper.java
Thu Sep 30 14:05:38 2010
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.mahout.clustering.syntheticcontrol.canopy;
+package org.apache.mahout.clustering.conversion;
 
 import java.io.IOException;
 import java.lang.reflect.Constructor;

Copied: mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputDriver.java
(from r1002835, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputDriver.java)
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputDriver.java?p2=mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputDriver.java&p1=mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputDriver.java&r1=1002835&r2=1003067&rev=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputDriver.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputDriver.java
Thu Sep 30 14:05:38 2010
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.mahout.clustering.syntheticcontrol.meanshift;
+package org.apache.mahout.clustering.conversion.meanshift;
 
 import java.io.IOException;
 
@@ -39,6 +39,11 @@ import org.apache.mahout.common.commandl
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+/**
+ * This class converts text files containing space-delimited floating point numbers into
+ * Mahout sequence files of MeanShiftCanopy suitable for input to the MeanShift clustering
job.
+ *
+ */
 public final class InputDriver {
 
   private static final Logger log = LoggerFactory.getLogger(InputDriver.class);
@@ -79,7 +84,7 @@ public final class InputDriver {
     job.setOutputKeyClass(Text.class);
     job.setOutputValueClass(MeanShiftCanopy.class);
     job.setOutputFormatClass(SequenceFileOutputFormat.class);
-    job.setMapperClass(org.apache.mahout.clustering.syntheticcontrol.meanshift.InputMapper.class);
+    job.setMapperClass(org.apache.mahout.clustering.conversion.meanshift.InputMapper.class);
     job.setReducerClass(Reducer.class);
     job.setNumReduceTasks(0);
     job.setJarByClass(InputDriver.class);

Copied: mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputMapper.java
(from r1002836, mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java)
URL: http://svn.apache.org/viewvc/mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputMapper.java?p2=mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputMapper.java&p1=mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java&r1=1002836&r2=1003067&rev=1003067&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/meanshift/InputMapper.java
(original)
+++ mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/conversion/meanshift/InputMapper.java
Thu Sep 30 14:05:38 2010
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.mahout.clustering.syntheticcontrol.meanshift;
+package org.apache.mahout.clustering.conversion.meanshift;
 
 import java.io.IOException;
 import java.util.ArrayList;



Mime
View raw message