public interface ItemBasedItemScorer
Score items with reference to specified item(s). These scores can be predicted relevance scores, purchase probabilities, or any other real-valued score which can be assigned to an item relative to a given item. This interface is distinguished from ItemScorer
in that it uses a set of reference items instead of a user as the basis for computing scores.
Modifier and Type | Method and Description |
---|---|
Result |
scoreRelatedItem(Collection<Long> basket,
long item)
Score a single item based on a collection of items (e.g.
|
Map<Long,Double> |
scoreRelatedItems(Collection<Long> basket,
Collection<Long> items)
Score a collection of items based on a collection of items (e.g.
|
ResultMap |
scoreRelatedItemsWithDetails(Collection<Long> basket,
Collection<Long> items)
Score a collection of items based on a collection of items (e.g.
|
Result scoreRelatedItem(@Nonnull Collection<Long> basket, long item)
Score a single item based on a collection of items (e.g. a shopping basket).
basket
- The objective items ID used as the queryitem
- The item ID to score.null
if no score can be predicted.@Nonnull Map<Long,Double> scoreRelatedItems(@Nonnull Collection<Long> basket, @Nonnull Collection<Long> items)
Score a collection of items based on a collection of items (e.g. a shopping basket).
basket
- The objective items ID used as the queryitems
- The list of items to score.ResultMap scoreRelatedItemsWithDetails(@Nonnull Collection<Long> basket, Collection<Long> items)
Score a collection of items based on a collection of items (e.g. a shopping basket), with details.
basket
- The items to use as the query.items
- The items to score.Result
.