mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r985330 - /mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java
Date Fri, 13 Aug 2010 19:32:42 GMT
Author: srowen
Date: Fri Aug 13 19:32:41 2010
New Revision: 985330

URL: http://svn.apache.org/viewvc?rev=985330&view=rev
Log:
Compile fix, oops

Modified:
    mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/display/DisplayDirichlet.java

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=985330&r1=985329&r2=985330&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
Fri Aug 13 19:32:41 2010
@@ -39,7 +39,8 @@ public class DisplayDirichlet extends Di
 
   public DisplayDirichlet() {
     initialize();
-    this.setTitle("Dirichlet Process Clusters - Normal Distribution (>" + (int) (SIGNIFICANCE
* 100) + "% of population)");
+    this.setTitle("Dirichlet Process Clusters - Normal Distribution (>" +
+        (int) (getSignificance() * 100) + "% of population)");
   }
 
   // Override the paint() method
@@ -66,10 +67,12 @@ public class DisplayDirichlet extends Di
     log.info(models.toString());
   }
 
-  protected static void generateResults(ModelDistribution<VectorWritable> modelDist,
-                                        int numClusters,
-                                        int numIterations,
-                                        double alpha_0, int thin, int burnin) {
+  protected void generateResults(ModelDistribution<VectorWritable> modelDist,
+                                 int numClusters,
+                                 int numIterations,
+                                 double alpha_0,
+                                 int thin,
+                                 int burnin) {
     DirichletClusterer<VectorWritable> dc = new DirichletClusterer<VectorWritable>(SAMPLE_DATA,
                                                                       modelDist,
                                                                       alpha_0,
@@ -102,8 +105,7 @@ public class DisplayDirichlet extends Di
     int alpha_0 = 1;
     int thin = 3;
     int burnin = 5;
-    generateResults(modelDist, numClusters, numIterations, alpha_0, thin, burnin);
-    new DisplayDirichlet();
+    new DisplayDirichlet().generateResults(modelDist, numClusters, numIterations, alpha_0,
thin, burnin);
   }
 
 }



Mime
View raw message