mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r780473 - in /lucene/mahout/trunk: core/src/main/java/org/apache/mahout/clustering/dirichlet/ core/src/main/java/org/apache/mahout/clustering/dirichlet/models/ core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/ core/src/main/java/...
Date Sun, 31 May 2009 17:13:09 GMT
Author: srowen
Date: Sun May 31 17:13:08 2009
New Revision: 780473

URL: http://svn.apache.org/viewvc?rev=780473&view=rev
Log:
More small tweaks -- mostly making stuff less visible where possible

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletCluster.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletMapper.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/JsonDirichletStateAdapter.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/UncommonDistributions.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/AsymmetricSampledNormalModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/SoftCluster.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansUtil.java
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedDistanceMeasure.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/canopy/DisplayCanopy.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/Display2dASNDirichlet.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayASNOutputState.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayDirichlet.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayNDirichlet.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayOutputState.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplaySNDirichlet.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/fuzzykmeans/DisplayFuzzyKMeans.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/kmeans/DisplayKMeans.java
    lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/NormalScModel.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletCluster.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletCluster.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletCluster.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletCluster.java
Sun May 31 17:13:08 2009
@@ -46,7 +46,7 @@
     this.totalCount += model.count();
   }
 
-  static final Type typeOfModel = new TypeToken<DirichletCluster<Vector>>() {
+  private static final Type typeOfModel = new TypeToken<DirichletCluster<Vector>>()
{
   }.getType();
 
   public String asFormatString() {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletClusterer.java
Sun May 31 17:13:08 2009
@@ -93,7 +93,7 @@
 
   private final int numClusters;
 
-  public final List<Model<Observation>[]> clusterSamples = new ArrayList<Model<Observation>[]>();
+  private final List<Model<Observation>[]> clusterSamples = new ArrayList<Model<Observation>[]>();
 
   /**
    * Create a new instance on the sample data with the given additional parameters

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletMapper.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletMapper.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletMapper.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletMapper.java
Sun May 31 17:13:08 2009
@@ -37,7 +37,7 @@
 public class DirichletMapper extends MapReduceBase implements
     Mapper<WritableComparable<?>, Text, Text, Text> {
 
-  DirichletState<Vector> state;
+  private DirichletState<Vector> state;
 
   @Override
   public void map(WritableComparable<?> key, Text values,
@@ -69,7 +69,7 @@
 
     try {
       DirichletState<Vector> state = DirichletDriver.createState(modelFactory,
-          new Integer(numClusters), new Double(alpha_0));
+          Integer.parseInt(numClusters), Double.parseDouble(alpha_0));
       Path path = new Path(statePath);
       FileSystem fs = FileSystem.get(path.toUri(), job);
       FileStatus[] status = fs.listStatus(path);
@@ -80,7 +80,7 @@
           Text key = new Text();
           Text value = new Text();
           while (reader.next(key, value)) {
-            int index = new Integer(key.toString());
+            int index = Integer.parseInt(key.toString());
             String formatString = value.toString();
             DirichletCluster<Vector> cluster = DirichletCluster
                 .fromFormatString(formatString);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletReducer.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletReducer.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletReducer.java
Sun May 31 17:13:08 2009
@@ -40,7 +40,7 @@
   @Override
   public void reduce(Text key, Iterator<Text> values,
       OutputCollector<Text, Text> output, Reporter reporter) throws IOException {
-    Integer k = new Integer(key.toString());
+    int k = Integer.parseInt(key.toString());
     Model<Vector> model = newModels[k];
     while (values.hasNext()) {
       Vector v = DenseVector.decodeFormat(values.next().toString());

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/JsonDirichletStateAdapter.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/JsonDirichletStateAdapter.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/JsonDirichletStateAdapter.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/JsonDirichletStateAdapter.java
Sun May 31 17:13:08 2009
@@ -39,10 +39,10 @@
 public class JsonDirichletStateAdapter implements
     JsonSerializer<DirichletState<?>>, JsonDeserializer<DirichletState<?>>
{
 
-  final Type typeOfModel = new TypeToken<List<DirichletCluster<Vector>>>()
{
+  private final Type typeOfModel = new TypeToken<List<DirichletCluster<Vector>>>()
{
   }.getType();
 
-  final Type typeOfModelDistribution = new TypeToken<ModelDistribution<Vector>>()
{
+  private final Type typeOfModelDistribution = new TypeToken<ModelDistribution<Vector>>()
{
   }.getType();
 
   @Override

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/UncommonDistributions.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/UncommonDistributions.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/UncommonDistributions.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/UncommonDistributions.java
Sun May 31 17:13:08 2009
@@ -28,7 +28,7 @@
 
   private static final double sqrt2pi = Math.sqrt(2.0 * Math.PI);
 
-  static Random random = new MersenneTwisterRNG();
+  private static Random random = new MersenneTwisterRNG();
 
   private UncommonDistributions() {
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/AsymmetricSampledNormalModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/AsymmetricSampledNormalModel.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/AsymmetricSampledNormalModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/AsymmetricSampledNormalModel.java
Sun May 31 17:13:08 2009
@@ -29,11 +29,11 @@
   public Vector sd;
 
   // the observation statistics, initialized by the first observation
-  int s0 = 0;
+  private int s0 = 0;
 
-  Vector s1;
+  private Vector s1;
 
-  Vector s2;
+  private Vector s2;
 
   public AsymmetricSampledNormalModel() {
     super();

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/NormalModel.java
Sun May 31 17:13:08 2009
@@ -31,9 +31,9 @@
   // the observation statistics, initialized by the first observation
   int s0 = 0;
 
-  Vector s1;
+  private Vector s1;
 
-  Vector s2;
+  private Vector s2;
 
   public NormalModel() {
   }

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
Sun May 31 17:13:08 2009
@@ -66,7 +66,7 @@
     String output = args[index++];
     String measureClass = args[index++];
     double convergenceDelta = Double.parseDouble(args[index++]);
-    int maxIterations = new Integer(args[index++]);
+    int maxIterations = Integer.parseInt(args[index++]);
     float m = Float.parseFloat(args[index++]);
     boolean doClustering = false;
     if (args.length > 7)

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java
Sun May 31 17:13:08 2009
@@ -34,7 +34,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-public class FuzzyKMeansUtil {
+class FuzzyKMeansUtil {
   private static final Logger log = LoggerFactory.getLogger(FuzzyKMeansUtil.class);
 
   private FuzzyKMeansUtil() {

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/SoftCluster.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/SoftCluster.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/SoftCluster.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/SoftCluster.java
Sun May 31 17:13:08 2009
@@ -42,7 +42,7 @@
 
   private static double m = 2.0; // default value
 
-  public static final double MINIMAL_VALUE = 0.0000000001; // using it for
+  private static final double MINIMAL_VALUE = 0.0000000001; // using it for
 
   // adding
 
@@ -73,11 +73,11 @@
   private boolean converged = false;
 
   // track membership parameters
-  double s0 = 0;
+  private double s0 = 0;
 
-  Vector s1;
+  private Vector s1;
 
-  Vector s2;
+  private Vector s2;
 
   private static DistanceMeasure measure;
 
@@ -105,7 +105,7 @@
     char firstChar = id.charAt(0);
     boolean startsWithV = firstChar == 'V';
     if (firstChar == 'C' || startsWithV) {
-      int clusterId = new Integer(formattedString.substring(1, beginIndex - 2));
+      int clusterId = Integer.parseInt(formattedString.substring(1, beginIndex - 2));
       Vector clusterCenter = AbstractVector.decodeVector(center);
 
       SoftCluster cluster = new SoftCluster(clusterCenter, clusterId);

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansReducer.java
Sun May 31 17:13:08 2009
@@ -34,7 +34,7 @@
 public class KMeansReducer extends MapReduceBase implements
     Reducer<Text, Text, Text, Text> {
 
-  protected Map<String, Cluster> clusterMap;
+  private Map<String, Cluster> clusterMap;
 
   @Override
   public void reduce(Text key, Iterator<Text> values,

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansUtil.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansUtil.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansUtil.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansUtil.java
Sun May 31 17:13:08 2009
@@ -31,7 +31,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public final class KMeansUtil {
+final class KMeansUtil {
 
   private static final Logger log = LoggerFactory.getLogger(KMeansUtil.class);
 

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedDistanceMeasure.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedDistanceMeasure.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedDistanceMeasure.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/utils/WeightedDistanceMeasure.java
Sun May 31 17:13:08 2009
@@ -41,7 +41,7 @@
   private List<Parameter<?>> parameters;
   private Parameter<Path> weightsFile;
   @SuppressWarnings("unchecked")
-  private Parameter<Class> vectorClass;
+  private ClassParameter vectorClass;
   protected Vector weights;
 
   @Override

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/TestClassifier.java
Sun May 31 17:13:08 2009
@@ -106,7 +106,7 @@
     modelPaths.put("thetaNormalizer", new Path(modelBasePath + "/trainer-thetaNormalizer/part-*"));
     modelPaths.put("weight", new Path(modelBasePath + "/trainer-tfIdf/trainer-tfIdf/part-*"));
 
-    FileSystem fs = FileSystem.get((new Path(modelBasePath)).toUri(), conf);
+    FileSystem fs = FileSystem.get(new Path(modelBasePath).toUri(), conf);
 
     log.info("Loading model from: {}", modelPaths);
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/classifier/bayes/XmlInputFormat.java
Sun May 31 17:13:08 2009
@@ -47,16 +47,16 @@
   }
 
   public static class XmlRecordReader implements RecordReader<LongWritable, Text> {
-    private byte[] startTag;
-    private byte[] endTag;
-    private long start;
-    private long end;
-    private FSDataInputStream fsin;
+    private final byte[] startTag;
+    private final byte[] endTag;
+    private final long start;
+    private final long end;
+    private final FSDataInputStream fsin;
     private final DataOutputBuffer buffer = new DataOutputBuffer();
 
     public XmlRecordReader(FileSplit split, JobConf jobConf) throws IOException {
-      startTag = jobConf.get("xmlinput.start").getBytes("utf-8");
-      endTag = jobConf.get("xmlinput.end").getBytes("utf-8");
+      startTag = jobConf.get(START_TAG_KEY).getBytes("utf-8");
+      endTag = jobConf.get(END_TAG_KEY).getBytes("utf-8");
 
       // open the file and seek to the start of the split
       start = split.getStart();

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/canopy/DisplayCanopy.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/canopy/DisplayCanopy.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/canopy/DisplayCanopy.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/canopy/DisplayCanopy.java
Sun May 31 17:13:08 2009
@@ -32,18 +32,18 @@
 import org.apache.mahout.utils.ManhattanDistanceMeasure;
 
 class DisplayCanopy extends DisplayDirichlet {
-  public DisplayCanopy() {
+  DisplayCanopy() {
     initialize();
     this.setTitle("Canopy Clusters (> 5% of population)");
   }
 
   private static final long serialVersionUID = 1L;
 
-  static List<Canopy> canopies;
+  private static List<Canopy> canopies;
 
-  static double t1 = 3.0;
+  private static final double t1 = 3.0;
 
-  static double t2 = 1.5;
+  private static final double t2 = 1.5;
 
   public void paint(Graphics g) {
     super.plotSampleData(g);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/Display2dASNDirichlet.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/Display2dASNDirichlet.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/Display2dASNDirichlet.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/Display2dASNDirichlet.java
Sun May 31 17:13:08 2009
@@ -28,7 +28,7 @@
 import org.apache.mahout.matrix.Vector;
 
 class Display2dASNDirichlet extends DisplayDirichlet {
-  public Display2dASNDirichlet() {
+  Display2dASNDirichlet() {
     initialize();
     this
         .setTitle("Dirichlet Process Clusters - 2-d Asymmetric Sampled Normal Distribution
(>"
@@ -62,7 +62,7 @@
     new Display2dASNDirichlet();
   }
 
-  static void generateResults() {
+  private static void generateResults() {
     DisplayDirichlet.generateResults(new AsymmetricSampledNormalDistribution());
   }
 }

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=780473&r1=780472&r2=780473&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
Sun May 31 17:13:08 2009
@@ -36,7 +36,7 @@
 import org.apache.mahout.matrix.Vector;
 
 class DisplayASNOutputState extends DisplayDirichlet {
-  public DisplayASNOutputState() {
+  DisplayASNOutputState() {
     initialize();
     this.setTitle("Dirichlet Process Clusters - Map/Reduce Results (>"
         + (int) (significance * 100) + "% of population)");

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayDirichlet.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayDirichlet.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayDirichlet.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayDirichlet.java
Sun May 31 17:13:08 2009
@@ -24,11 +24,11 @@
 
   protected int res; //screen resolution
 
-  protected final int ds = 72; //default scale = 72 pixels per inch
+  protected static final int ds = 72; //default scale = 72 pixels per inch
 
-  protected final int size = 8; // screen size in inches
+  protected static final int size = 8; // screen size in inches
 
-  public static final List<Vector> sampleData = new ArrayList<Vector>();
+  protected static final List<Vector> sampleData = new ArrayList<Vector>();
 
   protected static List<Model<Vector>[]> result;
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayNDirichlet.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayNDirichlet.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayNDirichlet.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayNDirichlet.java
Sun May 31 17:13:08 2009
@@ -28,7 +28,7 @@
 import org.apache.mahout.matrix.Vector;
 
 class DisplayNDirichlet extends DisplayDirichlet {
-  public DisplayNDirichlet() {
+  DisplayNDirichlet() {
     initialize();
     this.setTitle("Dirichlet Process Clusters - Normal Distribution (>"
         + (int) (significance * 100) + "% of population)");

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayOutputState.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayOutputState.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayOutputState.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplayOutputState.java
Sun May 31 17:13:08 2009
@@ -36,7 +36,7 @@
 import org.apache.mahout.matrix.Vector;
 
 class DisplayOutputState extends DisplayDirichlet {
-  public DisplayOutputState() {
+  DisplayOutputState() {
     initialize();
     this.setTitle("Dirichlet Process Clusters - Map/Reduce Results (>"
         + (int) (significance * 100) + "% of population)");

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplaySNDirichlet.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplaySNDirichlet.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplaySNDirichlet.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/dirichlet/DisplaySNDirichlet.java
Sun May 31 17:13:08 2009
@@ -28,7 +28,7 @@
 import org.apache.mahout.matrix.Vector;
 
 class DisplaySNDirichlet extends DisplayDirichlet {
-  public DisplaySNDirichlet() {
+  DisplaySNDirichlet() {
     initialize();
     this.setTitle("Dirichlet Process Clusters - Sampled Normal Distribution (>"
         + (int) (significance * 100) + "% of population)");

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/fuzzykmeans/DisplayFuzzyKMeans.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/fuzzykmeans/DisplayFuzzyKMeans.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/fuzzykmeans/DisplayFuzzyKMeans.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/fuzzykmeans/DisplayFuzzyKMeans.java
Sun May 31 17:13:08 2009
@@ -41,13 +41,13 @@
 
   private static final long serialVersionUID = 1L;
 
-  static List<Canopy> canopies;
+  private static List<Canopy> canopies;
 
-  static List<List<SoftCluster>> clusters;
+  private static List<List<SoftCluster>> clusters;
 
-  static double t1 = 3.0;
+  private static final double t1 = 3.0;
 
-  static double t2 = 1.5;
+  private static final double t2 = 1.5;
 
   @Override
   public void paint(Graphics g) {
@@ -67,7 +67,7 @@
   }
 
   public static void referenceFuzzyKMeans(List<Vector> points,
-      DistanceMeasure measure, double threshold, int numIter) throws Exception {
+      DistanceMeasure measure, double threshold, int numIter) {
     SoftCluster.config(measure, threshold);
     boolean converged = false;
     int iteration = 0;

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/kmeans/DisplayKMeans.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/kmeans/DisplayKMeans.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/kmeans/DisplayKMeans.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/kmeans/DisplayKMeans.java
Sun May 31 17:13:08 2009
@@ -40,13 +40,13 @@
 
   private static final long serialVersionUID = 1L;
 
-  static List<Canopy> canopies;
+  private static List<Canopy> canopies;
 
-  static List<List<Cluster>> clusters;
+  private static List<List<Cluster>> clusters;
 
-  static double t1 = 3.0;
+  private static final double t1 = 3.0;
 
-  static double t2 = 1.5;
+  private static final double t2 = 1.5;
 
   public void paint(Graphics g) {
     super.plotSampleData(g);

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/NormalScModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/NormalScModel.java?rev=780473&r1=780472&r2=780473&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/NormalScModel.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/syntheticcontrol/dirichlet/NormalScModel.java
Sun May 31 17:13:08 2009
@@ -25,16 +25,16 @@
   private static final double sqrt2pi = Math.sqrt(2.0 * Math.PI);
 
   // the parameters
-  public Vector mean;
+  private Vector mean;
 
-  public double sd;
+  private double sd;
 
   // the observation statistics, initialized by the first observation
-  int s0 = 0;
+  private int s0 = 0;
 
-  Vector s1;
+  private Vector s1;
 
-  Vector s2;
+  private Vector s2;
 
   public NormalScModel() {
   }



Mime
View raw message