mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r1463463 - /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java
Date Tue, 02 Apr 2013 09:36:40 GMT
Author: srowen
Date: Tue Apr  2 09:36:40 2013
New Revision: 1463463

URL: http://svn.apache.org/r1463463
Log:
MAHOUT-1185 ensure last item's value is counted in average (not diffs)

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java?rev=1463463&r1=1463462&r2=1463463&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/slopeone/MemoryDiffStorage.java
Tue Apr  2 09:36:40 2013
@@ -352,7 +352,7 @@ public final class MemoryDiffStorage imp
     // Save off prefs for the life of this loop iteration
     PreferenceArray userPreferences = dataModel.getPreferencesFromUser(userID);
     int length = userPreferences.length();
-    for (int i = 0; i < length - 1; i++) {
+    for (int i = 0; i < length; i++) { // Loop to length-1, not length-2, not for diffs
but average item pref
       float prefAValue = userPreferences.getValue(i);
       long itemIDA = userPreferences.getItemID(i);
       FastByIDMap<RunningAverage> aMap = averageDiffs.get(itemIDA);



Mime
View raw message