mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r834091 [2/2] - in /lucene/mahout/trunk: core/src/main/java/org/apache/mahout/cf/taste/hadoop/ core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/ core/src/main/java...
Date Mon, 09 Nov 2009 15:01:06 GMT
Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/VectorView.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/VectorView.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/VectorView.java (original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/matrix/VectorView.java Mon Nov
 9 15:00:48 2009
@@ -282,7 +282,7 @@
 
   @Override
   public void write(DataOutput dataOutput) throws IOException {
-    dataOutput.writeUTF(this.name == null ? "" : this.name);
+    dataOutput.writeUTF(this.getName() == null ? "" : this.getName());
     dataOutput.writeInt(offset);
     dataOutput.writeInt(cardinality);
     writeVector(dataOutput, vector);
@@ -290,7 +290,7 @@
 
   @Override
   public void readFields(DataInput dataInput) throws IOException {
-    this.name = dataInput.readUTF();
+    this.setName(dataInput.readUTF());
     this.offset = dataInput.readInt();
     this.cardinality = dataInput.readInt();
     this.vector = readVector(dataInput);

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialSequentialBuilder.java
Mon Nov  9 15:00:48 2009
@@ -118,7 +118,7 @@
       LongWritable key = reader.createKey();
       Text value = reader.createValue();
 
-      Step1Mapper mapper = new MockStep1Mapper(treeBuilder, dataset, seed,
+      Step1Mapper mapper = new MockStep1Mapper(getTreeBuilder(), dataset, getSeed(),
           hp, splits.length, numTrees);
 
       long time = System.currentTimeMillis();

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step0JobTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step0JobTest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step0JobTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step0JobTest.java
Mon Nov  9 15:00:48 2009
@@ -108,8 +108,8 @@
 
       // validate the mapper's output
       assertEquals(p, collector.keys[p]);
-      assertEquals(firstKey.longValue(), collector.values[p].firstId);
-      assertEquals(size, collector.values[p].size);
+      assertEquals(firstKey.longValue(), collector.values[p].getFirstId());
+      assertEquals(size, collector.values[p].getSize());
     }
 
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step1MapperTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step1MapperTest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step1MapperTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/Step1MapperTest.java
Mon Nov  9 15:00:48 2009
@@ -53,10 +53,6 @@
       configure(seed, partition, numMapTasks, numTrees);
     }
 
-    public int getFirstTreeId() {
-      return firstTreeId;
-    }
-
   }
 
   /** nb attributes per generated data instance */

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/PartialSequentialBuilder.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/PartialSequentialBuilder.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/PartialSequentialBuilder.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/PartialSequentialBuilder.java
Mon Nov  9 15:00:48 2009
@@ -124,7 +124,7 @@
       RecordReader<LongWritable, Text> reader = input.createRecordReader(split, task);
       reader.initialize(split, task);
       
-      Step1Mapper mapper = new MockStep1Mapper(treeBuilder, dataset, seed,
+      Step1Mapper mapper = new MockStep1Mapper(getTreeBuilder(), dataset, getSeed(),
           hp, nbSplits, numTrees);
 
       long time = System.currentTimeMillis();

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step0JobTest.java
Mon Nov  9 15:00:48 2009
@@ -139,8 +139,8 @@
 
       // validate the mapper's output
       assertEquals(p, context.keys[p]);
-      assertEquals(firstKey.longValue(), context.values[p].firstId);
-      assertEquals(size, context.values[p].size);
+      assertEquals(firstKey.longValue(), context.values[p].getFirstId());
+      assertEquals(size, context.values[p].getSize());
     }
 
   }

Modified: lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
(original)
+++ lucene/mahout/trunk/core/src/test/java/org/apache/mahout/df/mapreduce/partial/Step1MapperTest.java
Mon Nov  9 15:00:48 2009
@@ -52,11 +52,6 @@
       configure(false, true, treeBuilder, dataset);
       configure(seed, partition, numMapTasks, numTrees);
     }
-
-    public int getFirstTreeId() {
-      return firstTreeId;
-    }
-
   }
 
   /** nb attributes per generated data instance */

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/meanshift/DisplayMeanShift.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/meanshift/DisplayMeanShift.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/meanshift/DisplayMeanShift.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/clustering/meanshift/DisplayMeanShift.java
Mon Nov  9 15:00:48 2009
@@ -51,8 +51,8 @@
     // plot the axes
     g2.setColor(Color.BLACK);
     Vector dv = new DenseVector(2).assign(size / 2.0);
-    Vector dv1 = new DenseVector(2).assign(MeanShiftCanopy.t1);
-    Vector dv2 = new DenseVector(2).assign(MeanShiftCanopy.t2);
+    Vector dv1 = new DenseVector(2).assign(MeanShiftCanopy.getT1());
+    Vector dv2 = new DenseVector(2).assign(MeanShiftCanopy.getT2());
     plotRectangle(g2, new DenseVector(2).assign(2), dv);
     plotRectangle(g2, new DenseVector(2).assign(-2), dv);
 

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/BreimanExample.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/BreimanExample.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/BreimanExample.java (original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/BreimanExample.java Mon
Nov  9 15:00:48 2009
@@ -57,19 +57,19 @@
   private static final Logger log = LoggerFactory.getLogger(BreimanExample.class);
 
   /** sum test error */
-  protected static double sumTestErr;
+  private static double sumTestErr;
 
   /** sum mean tree error */
-  protected static double sumTreeErr;
+  private static double sumTreeErr;
 
   /** sum test error with m=1 */
-  protected static double sumOneErr = 0.0;
+  private static double sumOneErr = 0.0;
 
   /** mean time to build a forest with m=log2(M)+1 */
-  protected static long sumTimeM;
+  private static long sumTimeM;
 
   /** mean time to build a forest with m=1 */
-  protected static long sumTimeOne;
+  private static long sumTimeOne;
 
   /**
    * runs one iteration of the procedure.

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapred/BuildForest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapred/BuildForest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapred/BuildForest.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapred/BuildForest.java
Mon Nov  9 15:00:48 2009
@@ -56,19 +56,19 @@
 
   private static final Logger log = LoggerFactory.getLogger(BuildForest.class);
 
-  protected Path dataPath; // Data path
+  private Path dataPath; // Data path
 
-  protected Path datasetPath; // Dataset path
+  private Path datasetPath; // Dataset path
 
-  int m; // Number of variables to select at each tree-node
+  private int m; // Number of variables to select at each tree-node
 
-  int nbTrees; // Number of trees to grow
+  private int nbTrees; // Number of trees to grow
 
-  Long seed = null; // Random seed
+  private Long seed = null; // Random seed
 
-  boolean isPartial; // use partial data implementation
+  private boolean isPartial; // use partial data implementation
 
-  boolean isOob; // estimate oob error;
+  private boolean isOob; // estimate oob error;
 
   @Override
   public int run(String[] args) throws IOException {

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapreduce/BuildForest.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapreduce/BuildForest.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapreduce/BuildForest.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapreduce/BuildForest.java
Mon Nov  9 15:00:48 2009
@@ -56,19 +56,19 @@
 
   private static final Logger log = LoggerFactory.getLogger(BuildForest.class);
 
-  protected Path dataPath; // Data path
+  private Path dataPath; // Data path
 
-  protected Path datasetPath; // Dataset path
+  private Path datasetPath; // Dataset path
 
-  int m; // Number of variables to select at each tree-node
+  private int m; // Number of variables to select at each tree-node
 
-  int nbTrees; // Number of trees to grow
+  private int nbTrees; // Number of trees to grow
 
-  Long seed = null; // Random seed
+  private Long seed = null; // Random seed
 
-  boolean isPartial; // use partial data implementation
+  private boolean isPartial; // use partial data implementation
 
-  boolean isOob; // estimate oob error;
+  private boolean isOob; // estimate oob error;
 
   @Override
   public int run(String[] args) throws IOException, ClassNotFoundException, InterruptedException
{

Modified: lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java?rev=834091&r1=834090&r2=834091&view=diff
==============================================================================
--- lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java
(original)
+++ lucene/mahout/trunk/examples/src/main/java/org/apache/mahout/ga/watchmaker/cd/CDFitness.java
Mon Nov  9 15:00:48 2009
@@ -90,7 +90,7 @@
 
     CDFitness f = (CDFitness) obj;
 
-    return tp == f.tp && fp == f.fp && tn == f.tn && fn == f.fn;
+    return tp == f.getFp() && fp == f.getFp() && tn == f.getTn() &&
fn == f.getTn();
   }
 
   @Override



Mime
View raw message