mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeast...@apache.org
Subject svn commit: r1185737 - in /mahout/trunk/examples: bin/build-reuters.sh src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java
Date Tue, 18 Oct 2011 16:12:46 GMT
Author: jeastman
Date: Tue Oct 18 16:12:46 2011
New Revision: 1185737

URL: http://svn.apache.org/viewvc?rev=1185737&view=rev
Log:
MAHOUT-766: Changed m argument to 1.1 and switched Dirichlet to use clustering vs. classifier
implementation. Added cosine distance measure to reuters kmeans.

Modified:
    mahout/trunk/examples/bin/build-reuters.sh
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java

Modified: mahout/trunk/examples/bin/build-reuters.sh
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/bin/build-reuters.sh?rev=1185737&r1=1185736&r2=1185737&view=diff
==============================================================================
--- mahout/trunk/examples/bin/build-reuters.sh (original)
+++ mahout/trunk/examples/bin/build-reuters.sh Tue Oct 18 16:12:46 2011
@@ -96,6 +96,7 @@ if [ "x$clustertype" == "xkmeans" ]; the
     -i ${WORK_DIR}/reuters-out-seqdir-sparse-kmeans/tfidf-vectors/ \
     -c ${WORK_DIR}/reuters-kmeans-clusters \
     -o ${WORK_DIR}/reuters-kmeans \
+    -dm org.apache.mahout.common.distance.CosineDistanceMeasure \
     -x 10 -k 20 -ow \
   && \
   $MAHOUT clusterdump \

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java?rev=1185737&r1=1185736&r2=1185737&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java
Tue Oct 18 16:12:46 2011
@@ -80,7 +80,7 @@ public class DisplayDirichlet extends Di
                                         double alpha0,
                                         int thin,
                                         int burnin) throws IOException {
-    boolean runClusterer = false;
+    boolean runClusterer = true;
     if (runClusterer) {
       runSequentialDirichletClusterer(modelDist, numClusters, numIterations, alpha0, thin,
burnin);
     } else {

Modified: mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java
URL: http://svn.apache.org/viewvc/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java?rev=1185737&r1=1185736&r2=1185737&view=diff
==============================================================================
--- mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java
(original)
+++ mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayFuzzyKMeans.java
Tue Oct 18 16:12:46 2011
@@ -113,7 +113,7 @@ public class DisplayFuzzyKMeans extends 
     Path clusters = RandomSeedGenerator.buildRandom(conf, samples, new Path(
         output, "clusters-0"), 3, measure);
     double threshold = 0.001;
-    int m = 3;
+    float m = 1.1F;
     FuzzyKMeansDriver.run(samples, clusters, output, measure, threshold,
         maxIterations, m, true, true, threshold, true);
     



Mime
View raw message