|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DiffStorage
Implementations store item-item preference diffs for a
SlopeOneRecommender
. It actually does a bit
more for this implementation, like listing all items that may be considered for recommendation, in order to
maximize what implementations can do to optimize the slope-one algorithm.
SlopeOneRecommender
Method Summary | |
---|---|
RunningAverage |
getAverageItemPref(long itemID)
|
RunningAverage |
getDiff(long itemID1,
long itemID2)
|
RunningAverage[] |
getDiffs(long userID,
long itemID,
PreferenceArray prefs)
|
FastIDSet |
getRecommendableItemIDs(long userID)
|
void |
updateItemPref(long itemID,
float prefDelta,
boolean remove)
Updates internal data structures to reflect an update in a preference value for an item. |
Methods inherited from interface org.apache.mahout.cf.taste.common.Refreshable |
---|
refresh |
Method Detail |
---|
RunningAverage getDiff(long itemID1, long itemID2) throws TasteException
RunningAverage
encapsulating the average difference in preferences between items
corresponding to itemID1
and itemID2
, in that direction; that is, it's
the average of item 2's preferences minus item 1's preferences
TasteException
RunningAverage[] getDiffs(long userID, long itemID, PreferenceArray prefs) throws TasteException
userID
- user ID to get diffs foritemID
- itemID to assessprefs
- user's preferendces
RunningAverage
s for that user's item-item diffs
TasteException
RunningAverage getAverageItemPref(long itemID) throws TasteException
RunningAverage
encapsulating the average preference for the given item
TasteException
void updateItemPref(long itemID, float prefDelta, boolean remove) throws TasteException
Updates internal data structures to reflect an update in a preference value for an item.
itemID
- item to update preference value forprefDelta
- amount by which preference value changed (or its old value, if being removedremove
- if true
, operation reflects a removal rather than change of preference
TasteException
FastIDSet getRecommendableItemIDs(long userID) throws TasteException
TasteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |