mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1150697 - in /mahout/trunk/core/src/main/java/org/apache/mahout: cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java vectorizer/SparseVectorsFromSequenceFiles.java
Date Mon, 25 Jul 2011 13:41:01 GMT
Author: srowen
Date: Mon Jul 25 13:41:00 2011
New Revision: 1150697

URL: http://svn.apache.org/viewvc?rev=1150697&view=rev
Log:
MAHOUT-774 don't overwrite output without CLI flag

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java
    mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFiles.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java?rev=1150697&r1=1150696&r2=1150697&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/SamplingCandidateItemsStrategy.java
Mon Jul 25 13:41:00 2011
@@ -56,9 +56,6 @@ public class SamplingCandidateItemsStrat
    *   max(defaultMaxPrefsPerItemConsidered, userItemCountFactor * log(max(N_users, N_items)))
    * </pre>
    * </p>
-   *
-   * @param defaultMaxPrefsPerItemConsidered
-   * @param userItemCountMultiplier
    */
   public SamplingCandidateItemsStrategy(int defaultMaxPrefsPerItemConsidered, int userItemCountMultiplier)
{
     Preconditions.checkArgument(defaultMaxPrefsPerItemConsidered > 0, "defaultMaxPrefsPerItemConsidered
must be " +
@@ -76,7 +73,7 @@ public class SamplingCandidateItemsStrat
     for (long itemID : preferredItemIDs) {
       PreferenceArray prefs = dataModel.getPreferencesForItem(itemID);
       int prefsConsidered = Math.min(prefs.length(), maxPrefsPerItemConsidered);
-      Iterator<Preference> sampledPrefs = new FixedSizeSamplingIterator(prefsConsidered,
prefs.iterator());
+      Iterator<Preference> sampledPrefs = new FixedSizeSamplingIterator<Preference>(prefsConsidered,
prefs.iterator());
       while (sampledPrefs.hasNext()) {
         possibleItemsIDs.addAll(dataModel.getItemIDsFromUser(sampledPrefs.next().getUserID()));
       }

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFiles.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFiles.java?rev=1150697&r1=1150696&r2=1150697&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFiles.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/vectorizer/SparseVectorsFromSequenceFiles.java
Mon Jul 25 13:41:00 2011
@@ -238,7 +238,6 @@ public final class SparseVectorsFromSequ
       }
 
       Configuration conf = getConf();
-      HadoopUtil.delete(conf, outputDir);
       Path tokenizedPath = new Path(outputDir, DocumentProcessor.TOKENIZED_DOCUMENT_OUTPUT_FOLDER);
       DocumentProcessor.tokenizeDocuments(inputDir, analyzerClass, tokenizedPath, conf);
       



Mime
View raw message