public interface ItemBasedItemRecommender
Recommends items that go with a set of reference items. This interface is distinguished from ItemRecommender
in that it uses a set of reference items instead of a user as the basis for computing scores.
ItemRecommender
Modifier and Type | Method and Description |
---|---|
List<Long> |
recommendRelatedItems(long reference)
Recommend all possible items for a reference item using the default exclude set.
|
List<Long> |
recommendRelatedItems(long reference,
int n)
Recommend up to n possible items for a reference item using the default exclude set.
|
List<Long> |
recommendRelatedItems(Set<Long> basket)
Recommend all possible items for a set of reference items using the default exclude set.
|
List<Long> |
recommendRelatedItems(Set<Long> basket,
int n)
Recommend up to n items for a set of reference items using the default exclude set.
|
List<Long> |
recommendRelatedItems(Set<Long> basket,
int n,
Set<Long> candidates,
Set<Long> exclude)
Produce a set of recommendations for the item.
|
ResultList |
recommendRelatedItemsWithDetails(Set<Long> basket,
int n,
Set<Long> candidates,
Set<Long> exclude)
Produce a set of recommendations for the item, with details.
|
List<Long> recommendRelatedItems(long reference)
Recommend all possible items for a reference item using the default exclude set.
reference
- The reference item.recommendRelatedItems(Set, int, Set, Set)
List<Long> recommendRelatedItems(long reference, int n)
Recommend up to n possible items for a reference item using the default exclude set.
reference
- The reference item.n
- The number of items to recommend (< 0 for unlimited).recommendRelatedItems(Set, int, Set, Set)
List<Long> recommendRelatedItems(Set<Long> basket)
Recommend all possible items for a set of reference items using the default exclude set.
basket
- The reference items.recommendRelatedItems(Set, int, Set, Set)
List<Long> recommendRelatedItems(Set<Long> basket, int n)
Recommend up to n items for a set of reference items using the default exclude set.
basket
- The reference items.n
- The number of recommendations to return (< 0 for unlimited).recommendRelatedItems(Set, int, Set, Set)
List<Long> recommendRelatedItems(Set<Long> basket, int n, @Nullable Set<Long> candidates, @Nullable Set<Long> exclude)
Produce a set of recommendations for the item. This method allows the recommendations to be constrained by both a candidate set and an exclude set. The exclude set is applied to the candidate set, so the final effective candidate set is candidates minus exclude.
basket
- The reference items.n
- The number of ratings to return. If negative, no specific size is requested.candidates
- A set of candidate items which can be recommended. If null
, all items are considered candidates.exclude
- A set of items to be excluded. If null
, a default exclude set is used.ResultList recommendRelatedItemsWithDetails(Set<Long> basket, int n, @Nullable Set<Long> candidates, @Nullable Set<Long> exclude)
Produce a set of recommendations for the item, with details. This is the most general recommendation method, allowing the recommendations to be constrained by both a candidate set and an exclude set and potentially providing more details on each recommendation. The exclude set is applied to the candidate set, so the final effective candidate set is candidates minus exclude.
basket
- The reference items.n
- The number of ratings to return. If negative, no specific size is requested.candidates
- A set of candidate items which can be recommended. If null
, all items are considered candidates.exclude
- A set of items to be excluded. If null
, a default exclude set is used.Double.NaN
.