mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r948935 [1/3] - in /mahout/trunk: buildtools/src/main/resources/ core/src/main/java/org/apache/mahout/cf/taste/eval/ core/src/main/java/org/apache/mahout/cf/taste/hadoop/ core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ core/src/m...
Date Thu, 27 May 2010 18:02:23 GMT
Author: srowen
Date: Thu May 27 18:02:20 2010
New Revision: 948935

URL: http://svn.apache.org/viewvc?rev=948935&view=rev
Log:
First attach on the checkstyle warnings. Fixed a couple hundred and disabled javadoc check

Modified:
    mahout/trunk/buildtools/src/main/resources/mahout-checkstyle.xml
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/eval/DataModelBuilder.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityCountWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityPrefWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToEntityPrefsMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToItemPrefsMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateAndRecommendReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateCombiner.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/CooccurrenceColumnWrapperMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/PartialMultiplyMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToUserVectorReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToVectorAndPrefReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/TupleWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/UserIDsMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/CoRating.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedEuclideanDistanceSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedLogLikelihoodSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedPearsonCorrelationSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedTanimotoCoefficientSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredCosineSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredZeroAssumingCosineSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CopreferredItemsMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersKeyWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/SimilarityReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ToItemVectorReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneAverageDiffsJob.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneDiffsToAveragesReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/SamplingLongPrimitiveIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/LoadEvaluator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/neighborhood/NearestNUserNeighborhood.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ByValueRecommendedItemComparator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/CachingRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericUserBasedRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender2.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/jdbc/MySQLJDBCDiffStorage.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/SVDRecommender.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/similarity/jdbc/MySQLJDBCItemSimilarity.java
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/model/DataModel.java
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/bayes/mapreduce/common/BayesFeatureMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/canopy/CanopyDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/dirichlet/DirichletDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/fuzzykmeans/FuzzyKMeansUtil.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansClusterer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/kmeans/KMeansDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/lda/LDAMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopy.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyClusterer.java
    mahout/trunk/core/src/main/java/org/apache/mahout/clustering/meanshift/MeanShiftCanopyDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/IntPairWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/TimingStatistics.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/cache/LFUCache.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/commandline/DefaultOptionCreator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/distance/TanimotoDistanceMeasure.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/iterator/StableFixedSizeSamplingIterator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/common/parameters/Parametered.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/DFUtils.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/ErrorEstimate.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/data/DataLoader.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/data/DataUtils.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/data/DescriptorUtils.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/mapred/inmem/InMemInputFormat.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/mapred/partial/Step1Mapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/MapredOutput.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/inmem/InMemMapper.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/mapreduce/partial/InterResults.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Describe.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/Frequencies.java
    mahout/trunk/core/src/main/java/org/apache/mahout/df/tools/UDistrib.java
    mahout/trunk/core/src/main/java/org/apache/mahout/driver/MahoutDriver.java
    mahout/trunk/core/src/main/java/org/apache/mahout/ga/watchmaker/MahoutEvaluator.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/MatrixWritable.java
    mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/TimesSquaredJob.java
    mahout/trunk/core/src/test/java/org/apache/mahout/df/mapred/partial/PartialOutputCollector.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/grouplens/GroupLensRecommender.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/cf/taste/example/netflix/TransposeToByUser.java
    mahout/trunk/examples/src/main/java/org/apache/mahout/df/mapreduce/TestForest.java
    mahout/trunk/examples/src/test/java/org/apache/mahout/ga/watchmaker/cd/hadoop/CDMapperTest.java
    mahout/trunk/math/src/main/java/org/apache/mahout/math/matrix/linalg/SingularValueDecomposition.java
    mahout/trunk/math/src/test/java/org/apache/mahout/math/TestMatrixView.java
    mahout/trunk/maven/src/main/resources/mahout-checkstyle.xml
    mahout/trunk/utils/src/main/java/org/apache/mahout/benchmark/VectorBenchmarks.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/cdbw/CDbwDriver.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/cdbw/CDbwEvaluator.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/cdbw/CDbwMapper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/cdbw/CDbwReducer.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/clustering/lda/LDAPrintTopics.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/text/TextParagraphSplittingJob.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/SequenceFileDumper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/clustering/ClusterDumper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/CollocDriver.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/CollocReducer.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/Gram.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/GramKey.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/GramKeyGroupComparator.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/nlp/collocations/llr/LLRReducer.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/RowIdJob.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/SequenceFileVectorIterable.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/VectorDumper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/arff/ARFFVectorIterable.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/common/PartialVectorMerger.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/ClusterLabels.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/Driver.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/lucene/LuceneIterable.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/text/DocumentProcessor.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/text/document/SequenceFileTokenizerMapper.java
    mahout/trunk/utils/src/main/java/org/apache/mahout/utils/vectors/tfidf/TFIDFConverter.java

Modified: mahout/trunk/buildtools/src/main/resources/mahout-checkstyle.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/buildtools/src/main/resources/mahout-checkstyle.xml?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/buildtools/src/main/resources/mahout-checkstyle.xml (original)
+++ mahout/trunk/buildtools/src/main/resources/mahout-checkstyle.xml Thu May 27 18:02:20 2010
@@ -47,7 +47,7 @@
 		<!-- See http://checkstyle.sf.net/config_javadoc.html -->
 		<!-- <module name="PackageHtml"/> -->
 		<!--module name="JavadocMethod"/-->
-		<module name="JavadocType"/>
+		<!--module name="JavadocType"/-->
 		<!--module name="JavadocVariable"/-->
 		<!--module name="JavadocStyle"/-->
 
@@ -155,10 +155,12 @@
 		<module name="EmptyStatement" />
 		<module name="EqualsHashCode" />
 		<!--<module name="FinalLocalVariable"/>-->
+		<!--
 		<module name="HiddenField">
 			<property name="ignoreConstructorParameter" value="true" />
 			<property name="ignoreSetter" value="true" />
 		</module>
+		-->
 		<module name="IllegalInstantiation" />
 		<!--<module name="IllegalToken"/>-->
 		<!--<module name="IllegalTokenText"/>-->

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/eval/DataModelBuilder.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/eval/DataModelBuilder.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/eval/DataModelBuilder.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/eval/DataModelBuilder.java Thu May 27 18:02:20 2010
@@ -17,16 +17,14 @@
 
 package org.apache.mahout.cf.taste.eval;
 
-import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.impl.common.FastByIDMap;
 import org.apache.mahout.cf.taste.model.DataModel;
 import org.apache.mahout.cf.taste.model.PreferenceArray;
-import org.apache.mahout.cf.taste.recommender.Recommender;
 
 /**
  * <p>
  * Implementations of this inner interface are simple helper classes which create a {@link DataModel} to be
- * used while evaluating a {@link Recommender}.
+ * used while evaluating a {@link org.apache.mahout.cf.taste.recommender.Recommender}.
  * 
  * @see RecommenderBuilder
  * @see RecommenderEvaluator
@@ -41,8 +39,6 @@ public interface DataModelBuilder {
    * @param trainingData
    *          data to be used in the {@link DataModel}
    * @return {@link DataModel} based upon the given data
-   * @throws TasteException
-   *           if an error occurs while accessing the {@link DataModel}
    */
   DataModel buildDataModel(FastByIDMap<PreferenceArray> trainingData);
   

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityCountWritable.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityCountWritable.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityCountWritable.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityCountWritable.java Thu May 27 18:02:20 2010
@@ -21,11 +21,10 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hadoop.io.Writable;
 import org.apache.mahout.math.VarLongWritable;
 import org.apache.mahout.math.Varint;
 
-/** A {@link Writable} encapsulating an item ID and a count . */
+/** A {@link org.apache.hadoop.io.Writable} encapsulating an item ID and a count . */
 public final class EntityCountWritable extends VarLongWritable implements Cloneable {
 
   private int count;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityPrefWritable.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityPrefWritable.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityPrefWritable.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/EntityPrefWritable.java Thu May 27 18:02:20 2010
@@ -21,11 +21,10 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hadoop.io.Writable;
 import org.apache.mahout.common.RandomUtils;
 import org.apache.mahout.math.VarLongWritable;
 
-/** A {@link Writable} encapsulating an item ID and a preference value. */
+/** A {@link org.apache.hadoop.io.Writable} encapsulating an item ID and a preference value. */
 public final class EntityPrefWritable extends VarLongWritable implements Cloneable {
   
   private float prefValue;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToEntityPrefsMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToEntityPrefsMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToEntityPrefsMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToEntityPrefsMapper.java Thu May 27 18:02:20 2010
@@ -43,7 +43,7 @@ public abstract class ToEntityPrefsMappe
   }
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     booleanData = jobConf.getBoolean(RecommenderJob.BOOLEAN_DATA, false);
     transpose = jobConf.getBoolean(TRANSPOSE_USER_ITEM, false);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToItemPrefsMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToItemPrefsMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToItemPrefsMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/ToItemPrefsMapper.java Thu May 27 18:02:20 2010
@@ -17,15 +17,13 @@
 
 package org.apache.mahout.cf.taste.hadoop;
 
-import org.apache.hadoop.io.Text;
-
 /**
  * <h1>Input</h1>
  * 
  * <p>
  * Intended for use with {@link org.apache.hadoop.mapreduce.lib.input.TextInputFormat};
  * accepts line number / line pairs as
- * {@link org.apache.mahout.math.VarLongWritable}/{@link Text} pairs.
+ * {@link org.apache.mahout.math.VarLongWritable}/{@link org.apache.hadoop.io.Text} pairs.
  * </p>
  * 
  * <p>

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateAndRecommendReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateAndRecommendReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateAndRecommendReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateAndRecommendReducer.java Thu May 27 18:02:20 2010
@@ -59,7 +59,7 @@ public final class AggregateAndRecommend
   private OpenIntLongHashMap indexItemIDMap;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     recommendationsPerUser = jobConf.getInt(RECOMMENDATIONS_PER_USER, 10);
     try {
@@ -83,9 +83,9 @@ public final class AggregateAndRecommend
   }
 
   @Override
-  public void reduce(VarLongWritable key,
-                     Iterable<VectorWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable key,
+                        Iterable<VectorWritable> values,
+                        Context context) throws IOException, InterruptedException {
 
     Vector recommendationVector = null;
     for (VectorWritable vectorWritable : values) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateCombiner.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateCombiner.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateCombiner.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/AggregateCombiner.java Thu May 27 18:02:20 2010
@@ -28,9 +28,9 @@ public final class AggregateCombiner ext
     Reducer<VarLongWritable,VectorWritable,VarLongWritable,VectorWritable> {
 
   @Override
-  public void reduce(VarLongWritable key,
-                     Iterable<VectorWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable key,
+                        Iterable<VectorWritable> values,
+                        Context context) throws IOException, InterruptedException {
 
     Vector partial = null;
     for (VectorWritable vectorWritable : values) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/CooccurrenceColumnWrapperMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/CooccurrenceColumnWrapperMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/CooccurrenceColumnWrapperMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/CooccurrenceColumnWrapperMapper.java Thu May 27 18:02:20 2010
@@ -27,9 +27,9 @@ public final class CooccurrenceColumnWra
     Mapper<VarIntWritable,VectorWritable,VarIntWritable,VectorOrPrefWritable> {
 
   @Override
-  public void map(VarIntWritable key,
-                  VectorWritable value,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(VarIntWritable key,
+                     VectorWritable value,
+                     Context context) throws IOException, InterruptedException {
     context.write(key, new VectorOrPrefWritable(value.get()));
   }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexMapper.java Thu May 27 18:02:20 2010
@@ -36,15 +36,15 @@ public final class ItemIDIndexMapper ext
   private boolean transpose;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     transpose = jobConf.getBoolean(ToEntityPrefsMapper.TRANSPOSE_USER_ITEM, false);
   }
   
   @Override
-  public void map(LongWritable key,
-                  Text value,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(LongWritable key,
+                     Text value,
+                     Context context) throws IOException, InterruptedException {
     String[] tokens = ItemIDIndexMapper.COMMA.split(value.toString());
     long itemID = Long.parseLong(tokens[transpose ? 0 : 1]);
     int index = idToIndex(itemID);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ItemIDIndexReducer.java Thu May 27 18:02:20 2010
@@ -27,9 +27,9 @@ public final class ItemIDIndexReducer ex
     Reducer<VarIntWritable, VarLongWritable, VarIntWritable,VarLongWritable> {
   
   @Override
-  public void reduce(VarIntWritable index,
-                     Iterable<VarLongWritable> possibleItemIDs,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarIntWritable index,
+                        Iterable<VarLongWritable> possibleItemIDs,
+                        Context context) throws IOException, InterruptedException {
     long minimumItemID = Long.MAX_VALUE;
     for (VarLongWritable varLongWritable : possibleItemIDs) {
       long itemID = varLongWritable.get();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/PartialMultiplyMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/PartialMultiplyMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/PartialMultiplyMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/PartialMultiplyMapper.java Thu May 27 18:02:20 2010
@@ -31,9 +31,9 @@ public final class PartialMultiplyMapper
     Mapper<VarIntWritable,VectorAndPrefsWritable,VarLongWritable,VectorWritable> {
 
   @Override
-  public void map(VarIntWritable key,
-                  VectorAndPrefsWritable vectorAndPrefsWritable,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(VarIntWritable key,
+                     VectorAndPrefsWritable vectorAndPrefsWritable,
+                     Context context) throws IOException, InterruptedException {
 
     int itemIndex = key.get();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/RecommenderJob.java Thu May 27 18:02:20 2010
@@ -35,9 +35,9 @@ import org.apache.hadoop.mapreduce.lib.o
 import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.cf.taste.hadoop.EntityPrefWritable;
+import org.apache.mahout.cf.taste.hadoop.RecommendedItemsWritable;
 import org.apache.mahout.cf.taste.hadoop.ToItemPrefsMapper;
 import org.apache.mahout.common.AbstractJob;
-import org.apache.mahout.cf.taste.hadoop.RecommendedItemsWritable;
 import org.apache.mahout.math.VarIntWritable;
 import org.apache.mahout.math.VarLongWritable;
 import org.apache.mahout.math.VectorWritable;
@@ -48,8 +48,8 @@ import org.apache.mahout.math.VectorWrit
  * <p>Command line arguments specific to this class are:</p>
  * 
  * <ol>
- * <li>-Dmapred.input.dir=(path): Directory containing a text file containing user IDs for which recommendations should be
- * computed, one per line</li>
+ * <li>-Dmapred.input.dir=(path): Directory containing a text file containing user IDs
+ *  for which recommendations should be computed, one per line</li>
  * <li>-Dmapred.output.dir=(path): output path where recommender output should go</li>
  * <li>--usersFile (path): file containing user IDs to recommend for (optional)</li>
  * <li>--numRecommendations (integer): Number of recommendations to compute per user (optional; default 10)</li>
@@ -147,7 +147,8 @@ public final class RecommenderJob extend
       prePartialMultiply2.waitForCompletion(true);
 
       Job partialMultiply = prepareJob(
-        new Path(prePartialMultiplyPath1 + "," + prePartialMultiplyPath2), partialMultiplyPath, SequenceFileInputFormat.class,
+        new Path(prePartialMultiplyPath1 + "," + prePartialMultiplyPath2), partialMultiplyPath,
+        SequenceFileInputFormat.class,
         Mapper.class, VarIntWritable.class, VectorOrPrefWritable.class,
         ToVectorAndPrefReducer.class, VarIntWritable.class, VectorAndPrefsWritable.class,
         SequenceFileOutputFormat.class);
@@ -189,7 +190,7 @@ public final class RecommenderJob extend
     conf.setInt("io.sort.mb", assumedHeapSize / 2);
     // For some reason the Merger doesn't report status for a long time; increase
     // timeout when running these jobs
-    conf.setInt("mapred.task.timeout", 60*60*1000);
+    conf.setInt("mapred.task.timeout", 60 * 60 * 1000);
   }
   
   public static void main(String[] args) throws Exception {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToUserVectorReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToUserVectorReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToUserVectorReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToUserVectorReducer.java Thu May 27 18:02:20 2010
@@ -47,18 +47,15 @@ public final class ToUserVectorReducer e
     Reducer<VarLongWritable,VarLongWritable,VarLongWritable,VectorWritable> {
   
   @Override
-  public void reduce(VarLongWritable userID,
-                     Iterable<VarLongWritable> itemPrefs,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable userID,
+                        Iterable<VarLongWritable> itemPrefs,
+                        Context context) throws IOException, InterruptedException {
     Vector userVector = new RandomAccessSparseVector(Integer.MAX_VALUE, 100);
     for (VarLongWritable itemPref : itemPrefs) {
       int index = ItemIDIndexMapper.idToIndex(itemPref.get());
-      float value;
-      if (itemPref instanceof EntityPrefWritable) {
-        value = ((EntityPrefWritable) itemPref).getPrefValue();
-      } else {
-        value = 1.0f;
-      }
+      float value = itemPref instanceof EntityPrefWritable ?
+          ((EntityPrefWritable) itemPref).getPrefValue() :
+          1.0f;
       userVector.set(index, value);
     }
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToVectorAndPrefReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToVectorAndPrefReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToVectorAndPrefReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/ToVectorAndPrefReducer.java Thu May 27 18:02:20 2010
@@ -29,9 +29,9 @@ public final class ToVectorAndPrefReduce
     Reducer<VarIntWritable,VectorOrPrefWritable,VarIntWritable,VectorAndPrefsWritable> {
 
   @Override
-  public void reduce(VarIntWritable key,
-                     Iterable<VectorOrPrefWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarIntWritable key,
+                        Iterable<VectorOrPrefWritable> values,
+                        Context context) throws IOException, InterruptedException {
 
     List<Long> userIDs = new ArrayList<Long>();
     List<Float> prefValues = new ArrayList<Float>();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/TupleWritable.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/TupleWritable.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/TupleWritable.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/TupleWritable.java Thu May 27 18:02:20 2010
@@ -26,24 +26,7 @@ import org.apache.mahout.math.VarIntWrit
 import org.apache.mahout.math.VarLongWritable;
 
 public final class TupleWritable extends ArrayWritable {
-  
-  public static class Field extends GenericWritable {
-    
-    private static final Class<?>[] CLASSES = {VarIntWritable.class, VarLongWritable.class, DoubleWritable.class,
-                                               Text.class};
-    
-    @Override
-    protected Class<? extends Writable>[] getTypes() {
-      return (Class<? extends Writable>[]) CLASSES;
-    }
-    
-    public Field() { }
-    
-    public Field(Writable writable) {
-      super.set(writable);
-    }
-  }
-  
+
   public TupleWritable() {
     super(Field.class);
   }
@@ -134,5 +117,24 @@ public final class TupleWritable extends
       throw new IllegalArgumentException("Not an double: " + wrappedClass);
     }
   }
+
+
+  public static class Field extends GenericWritable {
+
+    private static final Class<?>[] CLASSES = {VarIntWritable.class, VarLongWritable.class, DoubleWritable.class,
+                                               Text.class};
+
+    @Override
+    protected Class<? extends Writable>[] getTypes() {
+      return (Class<? extends Writable>[]) CLASSES;
+    }
+
+    public Field() { }
+
+    public Field(Writable writable) {
+      super.set(writable);
+    }
+  }
+
   
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorSplitterMapper.java Thu May 27 18:02:20 2010
@@ -42,7 +42,7 @@ public final class UserVectorSplitterMap
   private FastIDSet usersToRecommendFor;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     try {
       FileSystem fs = FileSystem.get(jobConf);
@@ -63,9 +63,9 @@ public final class UserVectorSplitterMap
   }
 
   @Override
-  public void map(VarLongWritable key,
-                  VectorWritable value,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(VarLongWritable key,
+                     VectorWritable value,
+                     Context context) throws IOException, InterruptedException {
     long userID = key.get();
     if (usersToRecommendFor != null && !usersToRecommendFor.contains(userID)) {
       return;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceMapper.java Thu May 27 18:02:20 2010
@@ -41,9 +41,9 @@ public final class UserVectorToCooccurre
   private final OpenIntIntHashMap indexCounts = new OpenIntIntHashMap();
 
   @Override
-  public void map(VarLongWritable userID,
-                  VectorWritable userVectorWritable,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(VarLongWritable userID,
+                     VectorWritable userVectorWritable,
+                     Context context) throws IOException, InterruptedException {
 
     Vector userVector = userVectorWritable.get();
     countSeen(userVector);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/item/UserVectorToCooccurrenceReducer.java Thu May 27 18:02:20 2010
@@ -29,9 +29,9 @@ public final class UserVectorToCooccurre
     Reducer<VarIntWritable,VarIntWritable,VarIntWritable,VectorWritable> {
 
   @Override
-  public void reduce(VarIntWritable itemIndex1,
-                     Iterable<VarIntWritable> itemIndex2s,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarIntWritable itemIndex1,
+                        Iterable<VarIntWritable> itemIndex2s,
+                        Context context) throws IOException, InterruptedException {
     Vector cooccurrenceRow = new RandomAccessSparseVector(Integer.MAX_VALUE, 100);
     for (VarIntWritable varIntWritable : itemIndex2s) {
       int itemIndex2 = varIntWritable.get();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderJob.java Thu May 27 18:02:20 2010
@@ -24,7 +24,6 @@ import org.apache.commons.cli2.Option;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.NullWritable;
-import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.hadoop.io.compress.GzipCodec;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/RecommenderReducer.java Thu May 27 18:02:20 2010
@@ -57,7 +57,7 @@ public final class RecommenderReducer ex
   private int recommendationsPerUser;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     String dataModelFile = jobConf.get(DATA_MODEL_FILE);
     String recommenderClassName = jobConf.get(RECOMMENDER_CLASS_NAME);
@@ -92,9 +92,9 @@ public final class RecommenderReducer ex
   }
   
   @Override
-  public void reduce(VarLongWritable key,
-                     Iterable<NullWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable key,
+                        Iterable<NullWritable> values,
+                        Context context) throws IOException, InterruptedException {
     long userID = key.get();
     List<RecommendedItem> recommendedItems;
     try {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/UserIDsMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/UserIDsMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/UserIDsMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/pseudo/UserIDsMapper.java Thu May 27 18:02:20 2010
@@ -32,9 +32,9 @@ public final class UserIDsMapper extends
     Mapper<LongWritable,Text, VarLongWritable,NullWritable> {
   
   @Override
-  public void map(LongWritable key,
-                  Text value,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(LongWritable key,
+                     Text value,
+                     Context context) throws IOException, InterruptedException {
     String line = value.toString();
     int comma = line.indexOf(',');
     long userID = comma >= 0 ? Long.parseLong(line.substring(0, comma)) : Long.parseLong(line);

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/CoRating.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/CoRating.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/CoRating.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/CoRating.java Thu May 27 18:02:20 2010
@@ -57,7 +57,7 @@ public final class CoRating implements W
   public boolean equals(Object obj) {
     if (obj instanceof CoRating) {
       CoRating other = (CoRating) obj;
-      return (prefValueX == other.prefValueX && prefValueY == other.prefValueY);
+      return prefValueX == other.prefValueX && prefValueY == other.prefValueY;
     }
     return false;
   }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedEuclideanDistanceSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedEuclideanDistanceSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedEuclideanDistanceSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedEuclideanDistanceSimilarity.java Thu May 27 18:02:20 2010
@@ -17,10 +17,8 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import org.apache.mahout.cf.taste.impl.similarity.EuclideanDistanceSimilarity;
-
 /**
- * distributed version of {@link EuclideanDistanceSimilarity}
+ * Distributed version of {@link org.apache.mahout.cf.taste.impl.similarity.EuclideanDistanceSimilarity}
  */
 public class DistributedEuclideanDistanceSimilarity extends AbstractDistributedItemSimilarity {
 
@@ -30,8 +28,8 @@ public class DistributedEuclideanDistanc
                                    double weightOfItemVectorY,
                                    int numberOfUsers) {
 
-    double n=0;
-    double sumXYdiff2 = 0;
+    double n = 0.0;
+    double sumXYdiff2 = 0.0;
 
     for (CoRating coRating : coratings) {
       double diff = coRating.getPrefValueX() - coRating.getPrefValueY();

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedLogLikelihoodSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedLogLikelihoodSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedLogLikelihoodSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedLogLikelihoodSimilarity.java Thu May 27 18:02:20 2010
@@ -17,10 +17,8 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import org.apache.mahout.cf.taste.impl.similarity.LogLikelihoodSimilarity;
-
 /**
- * Distributed version of {@link LogLikelihoodSimilarity}
+ * Distributed version of {@link org.apache.mahout.cf.taste.impl.similarity.LogLikelihoodSimilarity}
  */
 public class DistributedLogLikelihoodSimilarity extends AbstractDistributedItemSimilarity {
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedPearsonCorrelationSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedPearsonCorrelationSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedPearsonCorrelationSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedPearsonCorrelationSimilarity.java Thu May 27 18:02:20 2010
@@ -17,10 +17,8 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity;
-
 /**
- * Distributed version of {@link PearsonCorrelationSimilarity}
+ * Distributed version of {@link org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity}
  */
 public class DistributedPearsonCorrelationSimilarity extends AbstractDistributedItemSimilarity {
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedTanimotoCoefficientSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedTanimotoCoefficientSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedTanimotoCoefficientSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedTanimotoCoefficientSimilarity.java Thu May 27 18:02:20 2010
@@ -17,38 +17,33 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import org.apache.mahout.cf.taste.impl.similarity.TanimotoCoefficientSimilarity;
-
 /**
- * Distributed version of {@link TanimotoCoefficientSimilarity}
+ * Distributed version of {@link org.apache.mahout.cf.taste.impl.similarity.TanimotoCoefficientSimilarity}
  */
 public class DistributedTanimotoCoefficientSimilarity extends AbstractDistributedItemSimilarity {
 
-	@Override
-	protected double doComputeResult(Iterable<CoRating> coratings,
-			                             double weightOfItemVectorX,
+  @Override
+  protected double doComputeResult(Iterable<CoRating> coratings,
+  		                             double weightOfItemVectorX,
                                    double weightOfItemVectorY,
-			                             int numberOfUsers) {
-
-	  int preferringXAndY = 0;
-	  for (CoRating coRating : coratings) {
-	    preferringXAndY++;
-	  }
-
-	  if (preferringXAndY == 0) {
-	    return Double.NaN;
-	  }
-
-	  return (preferringXAndY / (weightOfItemVectorX + weightOfItemVectorY - preferringXAndY));
+  		                             int numberOfUsers) {
+    int preferringXAndY = 0;
+    for (CoRating coRating : coratings) {
+      preferringXAndY++;
+    }
+    if (preferringXAndY == 0) {
+      return Double.NaN;
+    }
+    return (preferringXAndY / (weightOfItemVectorX + weightOfItemVectorY - preferringXAndY));
 	}
 
 	@Override
 	public double weightOfItemVector(Iterable<Float> prefValues) {
-		int nonZeroEntries = 0;
-		for (Float prefValue : prefValues) {
-		  nonZeroEntries++;
-		}
-		return nonZeroEntries;
-	}
+    int nonZeroEntries = 0;
+    for (Float prefValue : prefValues) {
+      nonZeroEntries++;
+    }
+    return nonZeroEntries;
+  }
 
 }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredCosineSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredCosineSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredCosineSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredCosineSimilarity.java Thu May 27 18:02:20 2010
@@ -17,10 +17,8 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import org.apache.mahout.cf.taste.impl.similarity.UncenteredCosineSimilarity;
-
 /**
- * Distributed version of {@link UncenteredCosineSimilarity}
+ * Distributed version of {@link org.apache.mahout.cf.taste.impl.similarity.UncenteredCosineSimilarity}
  */
 public class DistributedUncenteredCosineSimilarity extends AbstractDistributedItemSimilarity {
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredZeroAssumingCosineSimilarity.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredZeroAssumingCosineSimilarity.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredZeroAssumingCosineSimilarity.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/DistributedUncenteredZeroAssumingCosineSimilarity.java Thu May 27 18:02:20 2010
@@ -17,8 +17,6 @@
 
 package org.apache.mahout.cf.taste.hadoop.similarity;
 
-import java.util.Iterator;
-
 /**
  * distributed cosine similarity that assumes that all unknown preferences
  * are zeros and that does not center data

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CopreferredItemsMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CopreferredItemsMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CopreferredItemsMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CopreferredItemsMapper.java Thu May 27 18:02:20 2010
@@ -31,10 +31,9 @@ public final class CopreferredItemsMappe
     Mapper<VarLongWritable,ItemPrefWithItemVectorWeightArrayWritable,ItemPairWritable,CoRating> {
 
   @Override
-  public void map(VarLongWritable user,
-                  ItemPrefWithItemVectorWeightArrayWritable itemPrefsArray,
-                  Context context)
-      throws IOException, InterruptedException {
+  protected void map(VarLongWritable user,
+                     ItemPrefWithItemVectorWeightArrayWritable itemPrefsArray,
+                     Context context) throws IOException, InterruptedException {
 
     ItemPrefWithItemVectorWeightWritable[] itemPrefs = itemPrefsArray.getItemPrefs();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersKeyWritable.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersKeyWritable.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersKeyWritable.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersKeyWritable.java Thu May 27 18:02:20 2010
@@ -22,7 +22,6 @@ import java.io.DataOutput;
 import java.io.IOException;
 import java.io.Serializable;
 
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.WritableComparable;
 import org.apache.hadoop.io.WritableComparator;
 import org.apache.hadoop.mapreduce.Partitioner;
@@ -62,7 +61,7 @@ public class CountUsersKeyWritable imple
 
   @Override
   public int compareTo(CountUsersKeyWritable other) {
-    return (userID == other.userID ? 0 : userID < other.userID ? -1 : 1);
+    return userID == other.userID ? 0 : userID < other.userID ? -1 : 1;
   }
 
   @Override

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersMapper.java Thu May 27 18:02:20 2010
@@ -34,7 +34,7 @@ public class CountUsersMapper extends
   private static final Pattern DELIMITER = Pattern.compile("[\t,]");
 
   @Override
-  public void map(LongWritable key, Text value, Context context)
+  protected void map(LongWritable key, Text value, Context context)
       throws IOException, InterruptedException {
 
     String[] tokens = DELIMITER.split(value.toString());

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/CountUsersReducer.java Thu May 27 18:02:20 2010
@@ -32,9 +32,9 @@ public class CountUsersReducer extends
     Reducer<CountUsersKeyWritable,VarLongWritable, VarIntWritable,NullWritable> {
 
   @Override
-  public void reduce(CountUsersKeyWritable key,
-                     Iterable<VarLongWritable> userIDs,
-                     Context context)
+  protected void reduce(CountUsersKeyWritable key,
+                        Iterable<VarLongWritable> userIDs,
+                        Context context)
       throws IOException, InterruptedException {
 
     long lastSeenUserID = Long.MIN_VALUE;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ItemSimilarityJob.java Thu May 27 18:02:20 2010
@@ -32,9 +32,7 @@ import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.io.DoubleWritable;
 import org.apache.hadoop.io.IOUtils;
 import org.apache.hadoop.io.NullWritable;
-import org.apache.hadoop.io.RawComparator;
 import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.mapreduce.Partitioner;
 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
 import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
 import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserMapper.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserMapper.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserMapper.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserMapper.java Thu May 27 18:02:20 2010
@@ -39,16 +39,16 @@ public final class PreferredItemsPerUser
   private DistributedItemSimilarity distributedSimilarity;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     distributedSimilarity =
       ItemSimilarityJob.instantiateSimilarity(jobConf.get(ItemSimilarityJob.DISTRIBUTED_SIMILARITY_CLASSNAME));
   }
 
   @Override
-  public void map(VarLongWritable item,
-                  EntityPrefWritableArrayWritable userPrefsArray,
-                  Context context) throws IOException, InterruptedException {
+  protected void map(VarLongWritable item,
+                     EntityPrefWritableArrayWritable userPrefsArray,
+                     Context context) throws IOException, InterruptedException {
 
     EntityPrefWritable[] userPrefs = userPrefsArray.getPrefs();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/PreferredItemsPerUserReducer.java Thu May 27 18:02:20 2010
@@ -28,9 +28,9 @@ public final class PreferredItemsPerUser
     Reducer<VarLongWritable,ItemPrefWithItemVectorWeightWritable,VarLongWritable,ItemPrefWithItemVectorWeightArrayWritable> {
 
   @Override
-  public void reduce(VarLongWritable user,
-                     Iterable<ItemPrefWithItemVectorWeightWritable> itemPrefs,
-                     Context context)
+  protected void reduce(VarLongWritable user,
+                        Iterable<ItemPrefWithItemVectorWeightWritable> itemPrefs,
+                        Context context)
       throws IOException, InterruptedException {
 
     Set<ItemPrefWithItemVectorWeightWritable> itemPrefsWithItemVectorWeight

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/SimilarityReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/SimilarityReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/SimilarityReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/SimilarityReducer.java Thu May 27 18:02:20 2010
@@ -37,7 +37,7 @@ public final class SimilarityReducer ext
   private int numberOfUsers;
 
   @Override
-  public void setup(Context context) {
+  protected void setup(Context context) {
     Configuration jobConf = context.getConfiguration();
     distributedItemSimilarity =
       ItemSimilarityJob.instantiateSimilarity(jobConf.get(ItemSimilarityJob.DISTRIBUTED_SIMILARITY_CLASSNAME));
@@ -48,9 +48,9 @@ public final class SimilarityReducer ext
   }
 
   @Override
-  public void reduce(ItemPairWritable pair,
-                     Iterable<CoRating> coRatings,
-                     Context context)
+  protected void reduce(ItemPairWritable pair,
+                        Iterable<CoRating> coRatings,
+                        Context context)
       throws IOException, InterruptedException {
 
     double similarity =

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ToItemVectorReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ToItemVectorReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ToItemVectorReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/similarity/item/ToItemVectorReducer.java Thu May 27 18:02:20 2010
@@ -34,10 +34,9 @@ public final class ToItemVectorReducer e
     Reducer<VarLongWritable,EntityPrefWritable,VarLongWritable,EntityPrefWritableArrayWritable> {
 
   @Override
-  public void reduce(VarLongWritable item,
-                     Iterable<EntityPrefWritable> userPrefs,
-                     Context context)
-      throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable item,
+                        Iterable<EntityPrefWritable> userPrefs,
+                        Context context) throws IOException, InterruptedException {
 
     Set<EntityPrefWritable> collectedUserPrefs = new HashSet<EntityPrefWritable>();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneAverageDiffsJob.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneAverageDiffsJob.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneAverageDiffsJob.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneAverageDiffsJob.java Thu May 27 18:02:20 2010
@@ -34,9 +34,9 @@ import org.apache.hadoop.mapreduce.lib.o
 import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
 import org.apache.hadoop.util.ToolRunner;
 import org.apache.mahout.cf.taste.hadoop.EntityEntityWritable;
-import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.cf.taste.hadoop.EntityPrefWritable;
 import org.apache.mahout.cf.taste.hadoop.ToItemPrefsMapper;
+import org.apache.mahout.common.AbstractJob;
 import org.apache.mahout.math.VarLongWritable;
 
 public final class SlopeOneAverageDiffsJob extends AbstractJob {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneDiffsToAveragesReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneDiffsToAveragesReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneDiffsToAveragesReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOneDiffsToAveragesReducer.java Thu May 27 18:02:20 2010
@@ -27,9 +27,9 @@ public final class SlopeOneDiffsToAverag
     Reducer<EntityEntityWritable,FloatWritable, EntityEntityWritable,FloatWritable> {
   
   @Override
-  public void reduce(EntityEntityWritable key,
-                     Iterable<FloatWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(EntityEntityWritable key,
+                        Iterable<FloatWritable> values,
+                        Context context) throws IOException, InterruptedException {
     int count = 0;
     double total = 0.0;
     for (FloatWritable value : values) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/hadoop/slopeone/SlopeOnePrefsToDiffsReducer.java Thu May 27 18:02:20 2010
@@ -32,9 +32,9 @@ public final class SlopeOnePrefsToDiffsR
     Reducer<VarLongWritable,EntityPrefWritable,EntityEntityWritable,FloatWritable> {
   
   @Override
-  public void reduce(VarLongWritable key,
-                     Iterable<EntityPrefWritable> values,
-                     Context context) throws IOException, InterruptedException {
+  protected void reduce(VarLongWritable key,
+                        Iterable<EntityPrefWritable> values,
+                        Context context) throws IOException, InterruptedException {
     List<EntityPrefWritable> prefs = new ArrayList<EntityPrefWritable>();
     for (EntityPrefWritable writable : values) {
       prefs.add(new EntityPrefWritable(writable));

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/LongPrimitiveIterator.java Thu May 27 18:02:20 2010
@@ -17,12 +17,10 @@
 
 package org.apache.mahout.cf.taste.impl.common;
 
-import java.util.Iterator;
-
 /**
- * Adds notion of iterating over <code>long</code> primitives in the style of an {@link Iterator} -- as
+ * Adds notion of iterating over <code>long</code> primitives in the style of an {@link java.util.Iterator} -- as
  * opposed to iterating over {@link Long}. Implementations of this interface however also implement
- * {@link Iterator} and {@link Iterable} over {@link Long} for convenience.
+ * {@link java.util.Iterator} and {@link Iterable} over {@link Long} for convenience.
  */
 public interface LongPrimitiveIterator extends SkippingIterator<Long> {
   

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/SamplingLongPrimitiveIterator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/SamplingLongPrimitiveIterator.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/SamplingLongPrimitiveIterator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/common/SamplingLongPrimitiveIterator.java Thu May 27 18:02:20 2010
@@ -17,15 +17,14 @@
 
 package org.apache.mahout.cf.taste.impl.common;
 
-import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.Random;
 
 import org.apache.mahout.common.RandomUtils;
 
 /**
- * Wraps an {@link Iterator} and returns only some subset of the elements that it would, as determined by a
- * sampling rate parameter.
+ * Wraps a {@link LongPrimitiveIterator} and returns only some subset of the elements that it would,
+ * as determined by a sampling rate parameter.
  */
 public final class SamplingLongPrimitiveIterator extends AbstractLongPrimitiveIterator {
   

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/AbstractDifferenceRecommenderEvaluator.java Thu May 27 18:02:20 2010
@@ -174,7 +174,8 @@ abstract class AbstractDifferenceRecomme
     return estimate;
   }
   
-  private double getEvaluation(FastByIDMap<PreferenceArray> testUserPrefs, Recommender recommender) throws TasteException {
+  private double getEvaluation(FastByIDMap<PreferenceArray> testUserPrefs, Recommender recommender)
+      throws TasteException {
     reset();
     Collection<Callable<Void>> estimateCallables = new ArrayList<Callable<Void>>();
     for (Map.Entry<Long,PreferenceArray> entry : testUserPrefs.entrySet()) {
@@ -226,7 +227,7 @@ abstract class AbstractDifferenceRecomme
   
   abstract double computeFinalEvaluation();
   
-  private class PreferenceEstimateCallable implements Callable<Void> {
+  private final class PreferenceEstimateCallable implements Callable<Void> {
     
     private final Recommender recommender;
     private final long testUserID;
@@ -263,7 +264,7 @@ abstract class AbstractDifferenceRecomme
     
   }
   
-  private static class StatsCallable implements Callable<Void> {
+  private static final class StatsCallable implements Callable<Void> {
     
     private final Callable<Void> delegate;
     private final boolean logStats;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/LoadEvaluator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/LoadEvaluator.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/LoadEvaluator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/eval/LoadEvaluator.java Thu May 27 18:02:20 2010
@@ -48,7 +48,7 @@ public final class LoadEvaluator {
     AbstractDifferenceRecommenderEvaluator.execute(callables);
   }
   
-  private static class LoadCallable implements Callable<Void> {
+  private static final class LoadCallable implements Callable<Void> {
     
     private final Recommender recommender;
     private final long userID;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanItemPreferenceArray.java Thu May 27 18:02:20 2010
@@ -157,7 +157,7 @@ public final class BooleanItemPreference
 
   @Override
   public String toString() {
-    StringBuilder result = new StringBuilder(10*IDs.length);
+    StringBuilder result = new StringBuilder(10 * IDs.length);
     result.append("BooleanItemPreferenceArray[itemID:");
     result.append(id);
     result.append(",{");

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/BooleanUserPreferenceArray.java Thu May 27 18:02:20 2010
@@ -157,7 +157,7 @@ public final class BooleanUserPreference
 
   @Override
   public String toString() {
-    StringBuilder result = new StringBuilder(10*IDs.length);
+    StringBuilder result = new StringBuilder(10 * IDs.length);
     result.append("BooleanUserPreferenceArray[userID:");
     result.append(id);
     result.append(",{");

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericBooleanPrefDataModel.java Thu May 27 18:02:20 2010
@@ -20,7 +20,6 @@ package org.apache.mahout.cf.taste.impl.
 import java.io.Serializable;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.mahout.cf.taste.common.NoSuchItemException;
@@ -36,7 +35,7 @@ import org.apache.mahout.cf.taste.model.
 
 /**
  * <p>
- * A simple {@link DataModel} which uses a given {@link List} of users as its data source. This implementation
+ * A simple {@link DataModel} which uses given user data as its data source. This implementation
  * is mostly useful for small experiments and is not recommended for contexts where performance is important.
  * </p>
  */

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/GenericUserPreferenceArray.java Thu May 27 18:02:20 2010
@@ -218,7 +218,7 @@ public final class GenericUserPreference
 
   @Override
   public String toString() {
-    StringBuilder result = new StringBuilder(20*IDs.length);
+    StringBuilder result = new StringBuilder(20 * IDs.length);
     result.append("GenericUserPreferenceArray[userID:");
     result.append(id);
     result.append(",{");
@@ -235,7 +235,7 @@ public final class GenericUserPreference
   }
   
   private final class PreferenceArrayIterator implements Iterator<Preference> {
-    private int i = 0;
+    private int i;
     
     @Override
     public boolean hasNext() {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/file/FileDataModel.java Thu May 27 18:02:20 2010
@@ -25,7 +25,6 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.concurrent.locks.ReentrantLock;
 
 import org.apache.mahout.cf.taste.common.Refreshable;
@@ -327,7 +326,7 @@ public class FileDataModel extends Abstr
   
   /**
    * <p>
-   * Reads one line from the input file and adds the data to a {@link Map} data structure which maps user IDs
+   * Reads one line from the input file and adds the data to a {@link FastByIDMap} data structure which maps user IDs
    * to preferences. This assumes that each line of the input file corresponds to one preference. After
    * reading a line and determining which user and item the preference pertains to, the method should look to
    * see if the data contains a mapping for the user ID already, and if not, add an empty {@link List} of

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java Thu May 27 18:02:20 2010
@@ -41,7 +41,6 @@ import org.apache.mahout.cf.taste.impl.c
 import org.apache.mahout.cf.taste.impl.model.GenericItemPreferenceArray;
 import org.apache.mahout.cf.taste.impl.model.GenericPreference;
 import org.apache.mahout.cf.taste.impl.model.GenericUserPreferenceArray;
-import org.apache.mahout.cf.taste.model.DataModel;
 import org.apache.mahout.cf.taste.model.JDBCDataModel;
 import org.apache.mahout.cf.taste.model.Preference;
 import org.apache.mahout.cf.taste.model.PreferenceArray;
@@ -51,12 +50,12 @@ import org.slf4j.LoggerFactory;
 
 /**
  * <p>
- * An abstract superclass for JDBC-related {@link DataModel} implementations, providing most of the common
+ * An abstract superclass for {@link JDBCDataModel} implementations, providing most of the common
  * functionality that any such implementation would need.
  * </p>
  * 
  * <p>
- * Performance will be a concern with any JDBC-based {@link DataModel}. There are going to be lots of
+ * Performance will be a concern with any {@link JDBCDataModel}. There are going to be lots of
  * simultaneous reads and some writes to one table. Make sure the table is set up optimally -- for example,
  * you'll want to establish indexes.
  * </p>
@@ -815,7 +814,7 @@ public abstract class AbstractJDBCDataMo
     
   }
   
-  private class ItemPrefCountRetriever implements Retriever<Long,Integer> {
+  private final class ItemPrefCountRetriever implements Retriever<Long,Integer> {
     private final String getNumPreferenceForItemSQL;
     
     private ItemPrefCountRetriever(String getNumPreferenceForItemSQL) {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/MySQLJDBCDataModel.java Thu May 27 18:02:20 2010
@@ -24,12 +24,12 @@ import javax.sql.DataSource;
 
 import org.apache.mahout.cf.taste.common.TasteException;
 import org.apache.mahout.cf.taste.impl.common.jdbc.AbstractJDBCComponent;
-import org.apache.mahout.cf.taste.model.DataModel;
 
 /**
  * <p>
- * A {@link DataModel} backed by a MySQL database and accessed via JDBC. It may work with other JDBC
- * databases. By default, this class assumes that there is a {@link DataSource} available under the JNDI name
+ * A {@link org.apache.mahout.cf.taste.model.JDBCDataModel} backed by a MySQL database and
+ * accessed via JDBC. It may work with other JDBC databases. By default, this class
+ * assumes that there is a {@link DataSource} available under the JNDI name
  * "jdbc/taste", which gives access to a database with a "taste_preferences" table with the following schema:
  * </p>
  * 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/neighborhood/NearestNUserNeighborhood.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/neighborhood/NearestNUserNeighborhood.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/neighborhood/NearestNUserNeighborhood.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/neighborhood/NearestNUserNeighborhood.java Thu May 27 18:02:20 2010
@@ -116,7 +116,7 @@ public final class NearestNUserNeighborh
     return "NearestNUserNeighborhood";
   }
   
-  private static class Estimator implements TopItems.Estimator<Long> {
+  private static final class Estimator implements TopItems.Estimator<Long> {
     private final UserSimilarity userSimilarityImpl;
     private final long theUserID;
     private final double minSim;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ByValueRecommendedItemComparator.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ByValueRecommendedItemComparator.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ByValueRecommendedItemComparator.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/ByValueRecommendedItemComparator.java Thu May 27 18:02:20 2010
@@ -17,6 +17,7 @@
 
 package org.apache.mahout.cf.taste.impl.recommender;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
 import org.apache.mahout.cf.taste.recommender.RecommendedItem;
@@ -24,7 +25,7 @@ import org.apache.mahout.cf.taste.recomm
 /**
  * Defines a natural ordering from most-preferred item (highest value) to least-preferred.
  */
-public final class ByValueRecommendedItemComparator implements Comparator<RecommendedItem> {
+public final class ByValueRecommendedItemComparator implements Comparator<RecommendedItem>, Serializable {
 
   private static final Comparator<RecommendedItem> instance = new ByValueRecommendedItemComparator();
 

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/CachingRecommender.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/CachingRecommender.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/CachingRecommender.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/CachingRecommender.java Thu May 27 18:02:20 2010
@@ -17,7 +17,6 @@
 
 package org.apache.mahout.cf.taste.impl.recommender;
 
-import java.lang.ref.SoftReference;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -38,9 +37,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * <p>
- * A {@link Recommender} which caches the results from another {@link Recommender} in memory. Results are held
- * by {@link SoftReference}s so that the JVM may reclaim memory from the recommendationCache in low-memory
- * situations.
+ * A {@link Recommender} which caches the results from another {@link Recommender} in memory.
  * </p>
  */
 public final class CachingRecommender implements Recommender {

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericItemBasedRecommender.java Thu May 27 18:02:20 2010
@@ -270,7 +270,7 @@ public class GenericItemBasedRecommender
     }
   }
   
-  private static class MultiMostSimilarEstimator implements TopItems.Estimator<Long> {
+  private static final class MultiMostSimilarEstimator implements TopItems.Estimator<Long> {
     
     private final long[] toItemIDs;
     private final ItemSimilarity similarity;
@@ -300,7 +300,7 @@ public class GenericItemBasedRecommender
     }
   }
   
-  private class RecommendedBecauseEstimator implements TopItems.Estimator<Long> {
+  private final class RecommendedBecauseEstimator implements TopItems.Estimator<Long> {
     
     private final long userID;
     private final long recommendedItemID;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericUserBasedRecommender.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericUserBasedRecommender.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericUserBasedRecommender.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/GenericUserBasedRecommender.java Thu May 27 18:02:20 2010
@@ -191,7 +191,7 @@ public class GenericUserBasedRecommender
     }
   }
   
-  private static class MostSimilarEstimator implements TopItems.Estimator<Long> {
+  private static final class MostSimilarEstimator implements TopItems.Estimator<Long> {
     
     private final long toUserID;
     private final UserSimilarity similarity;

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java?rev=948935&r1=948934&r2=948935&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/TreeClusteringRecommender.java Thu May 27 18:02:20 2010
@@ -413,7 +413,7 @@ public final class TreeClusteringRecomme
     return "TreeClusteringRecommender[clusterSimilarity:" + clusterSimilarity + ']';
   }
   
-  private class Estimator implements TopItems.Estimator<Long> {
+  private final class Estimator implements TopItems.Estimator<Long> {
     
     private final FastIDSet cluster;
     



Mime
View raw message