mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r788919 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
Date Sat, 27 Jun 2009 02:57:19 GMT
Author: gsingers
Date: Sat Jun 27 02:57:18 2009
New Revision: 788919

URL: http://svn.apache.org/viewvc?rev=788919&view=rev
Log:
add the center as a point

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java?rev=788919&r1=788918&r2=788919&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/RandomSeedGenerator.java
Sat Jun 27 02:57:18 2009
@@ -54,7 +54,9 @@
         if (log.isInfoEnabled()) {
           log.info("Selected: " + value.asFormatString());
         }
-        writer.append(new Text(key.toString()), new Cluster(value));
+        Cluster val = new Cluster(value);
+        val.addPoint(value);
+        writer.append(new Text(key.toString()), val);
         count++;
       }
     }



Mime
View raw message