|
||||||||||
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 | |
---|---|
void |
addItemPref(long userID,
long itemID,
float prefValue)
Updates internal data structures to reflect a new preference value for an item. |
RunningAverage |
getAverageItemPref(long itemID)
|
RunningAverage |
getDiff(long itemID1,
long itemID2)
|
RunningAverage[] |
getDiffs(long userID,
long itemID,
PreferenceArray prefs)
|
FastIDSet |
getRecommendableItemIDs(long userID)
|
void |
removeItemPref(long userID,
long itemID,
float prefValue)
Updates internal data structures to reflect an update in a preference value for an item. |
void |
updateItemPref(long itemID,
float prefDelta)
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 addItemPref(long userID, long itemID, float prefValue) throws TasteException
Updates internal data structures to reflect a new preference value for an item.
userID
- user whose pref is being addeditemID
- item to add preference value forprefValue
- new preference value
TasteException
void updateItemPref(long itemID, float prefDelta) 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
TasteException
void removeItemPref(long userID, long itemID, float prefValue) throws TasteException
Updates internal data structures to reflect an update in a preference value for an item.
userID
- user whose pref is being removeditemID
- item to update preference value forprefValue
- old preference value
TasteException
FastIDSet getRecommendableItemIDs(long userID) throws TasteException
TasteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |