mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r900336 - /lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java
Date Mon, 18 Jan 2010 11:02:47 GMT
Author: srowen
Date: Mon Jan 18 11:02:47 2010
New Revision: 900336

URL: http://svn.apache.org/viewvc?rev=900336&view=rev
Log:
Another compile problem fix

Modified:
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java?rev=900336&r1=900335&r2=900336&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java
Mon Jan 18 11:02:47 2010
@@ -22,6 +22,7 @@
 import java.awt.Graphics2D;
 import java.io.File;
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -38,6 +39,7 @@
 import org.apache.mahout.math.VectorWritable;
 
 class DisplayASNOutputState extends DisplayDirichlet {
+
   DisplayASNOutputState() {
     initialize();
     this.setTitle("Dirichlet Process Clusters - Map/Reduce Results (>"
@@ -58,8 +60,9 @@
         AsymmetricSampledNormalModel mm = (AsymmetricSampledNormalModel) m;
         dv.set(0, mm.getStdDev().get(0) * 3);
         dv.set(1, mm.getStdDev().get(1) * 3);
-        if (isSignificant(mm))
+        if (isSignificant(mm)) {
           plotEllipse(g2, mm.getMean(), dv);
+        }
       }
     }
   }
@@ -83,11 +86,12 @@
 
   private static void getSamples() throws IOException {
     File f = new File("input");
-    for (File g : f.listFiles())
+    for (File g : f.listFiles()) {
       sampleData.addAll(readFile(g.getCanonicalPath()));
+    }
   }
 
-  private static void getResults() throws IOException {
+  private static void getResults() throws IOException, InvocationTargetException, NoSuchMethodException
{
     result = new ArrayList<Model<VectorWritable>[]>();
     JobConf conf = new JobConf(KMeansDriver.class);
     conf
@@ -103,7 +107,7 @@
     }
   }
 
-  public static void main(String[] args) throws IOException {
+  public static void main(String[] args) throws IOException, InvocationTargetException, NoSuchMethodException
{
     RandomUtils.useTestSeed();
     getSamples();
     getResults();
@@ -113,4 +117,5 @@
   static void generateResults() {
     DisplayDirichlet.generateResults(new NormalModelDistribution());
   }
+
 }



Mime
View raw message