public interface ItemBasedRecommender extends Recommender
Interface implemented by "item-based" recommenders.
Modifier and Type | Method and Description |
---|---|
List<RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany) |
List<RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
boolean excludeItemIfNotSimilarToAll) |
List<RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
Rescorer<LongPair> rescorer) |
List<RecommendedItem> |
mostSimilarItems(long[] itemIDs,
int howMany,
Rescorer<LongPair> rescorer,
boolean excludeItemIfNotSimilarToAll) |
List<RecommendedItem> |
mostSimilarItems(long itemID,
int howMany) |
List<RecommendedItem> |
mostSimilarItems(long itemID,
int howMany,
Rescorer<LongPair> rescorer) |
List<RecommendedItem> |
recommendedBecause(long userID,
long itemID,
int howMany)
Lists the items that were most influential in recommending a given item to a given user.
|
estimatePreference, getDataModel, recommend, recommend, recommend, recommend, removePreference, setPreference
refresh
List<RecommendedItem> mostSimilarItems(long itemID, int howMany) throws TasteException
itemID
- ID of item for which to find most similar other itemshowMany
- desired number of most similar items to findTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> mostSimilarItems(long itemID, int howMany, Rescorer<LongPair> rescorer) throws TasteException
itemID
- ID of item for which to find most similar other itemshowMany
- desired number of most similar items to findrescorer
- Rescorer
which can adjust item-item similarity estimates used to determine most similar
itemsTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany) throws TasteException
itemIDs
- IDs of item for which to find most similar other itemshowMany
- desired number of most similar items to find estimates used to determine most similar itemsTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, Rescorer<LongPair> rescorer) throws TasteException
itemIDs
- IDs of item for which to find most similar other itemshowMany
- desired number of most similar items to findrescorer
- Rescorer
which can adjust item-item similarity estimates used to determine most similar
itemsTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, boolean excludeItemIfNotSimilarToAll) throws TasteException
itemIDs
- IDs of item for which to find most similar other itemshowMany
- desired number of most similar items to findexcludeItemIfNotSimilarToAll
- exclude an item if it is not similar to each of the input itemsTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> mostSimilarItems(long[] itemIDs, int howMany, Rescorer<LongPair> rescorer, boolean excludeItemIfNotSimilarToAll) throws TasteException
itemIDs
- IDs of item for which to find most similar other itemshowMany
- desired number of most similar items to findrescorer
- Rescorer
which can adjust item-item similarity estimates used to determine most similar
itemsexcludeItemIfNotSimilarToAll
- exclude an item if it is not similar to each of the input itemsTasteException
- if an error occurs while accessing the DataModel
List<RecommendedItem> recommendedBecause(long userID, long itemID, int howMany) throws TasteException
Lists the items that were most influential in recommending a given item to a given user. Exactly how this is determined is left to the implementation, but, generally this will return items that the user prefers and that are similar to the given item.
This returns a List
of RecommendedItem
which is a little misleading since it's returning
recommending items, but, I thought it more natural to just reuse this class since it
encapsulates an item and value. The value here does not necessarily have a consistent interpretation or
expected range; it will be higher the more influential the item was in the recommendation.
userID
- ID of user who was recommended the itemitemID
- ID of item that was recommendedhowMany
- maximum number of items to returnList
of RecommendedItem
, ordered from most influential in recommended the given
item to leastTasteException
- if an error occurs while accessing the DataModel
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.