public class BiasItemScorer extends AbstractItemScorer
Score items using a user-item bias model. This scorer is good as a baseline scorer for many situations.
| Constructor and Description |
|---|
BiasItemScorer(BiasModel bias)
Construct a new scorer.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.Long,java.lang.Double> |
score(long user,
java.util.Collection<java.lang.Long> items)
Score a collection of items.
|
Result |
score(long user,
long item)
Score a single item.
|
ResultMap |
scoreWithDetails(long user,
java.util.Collection<java.lang.Long> items)
Score a collection of items and potentially return more details on the scores.
|
@Inject public BiasItemScorer(BiasModel bias)
Construct a new scorer.
bias - The bias model to use.public Result score(long user, long item)
AbstractItemScorerScore a single item.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection).
score in interface ItemScorerscore in class AbstractItemScoreruser - The user ID for whom to generate a score.item - The item ID to score.null if no score can be generated.@Nonnull
public java.util.Map<java.lang.Long,java.lang.Double> score(long user,
@Nonnull
java.util.Collection<java.lang.Long> items)
AbstractItemScorerScore a collection of items.
This implementation delegates to ItemScorer.scoreWithDetails(long, Collection).
score in interface ItemScorerscore in class AbstractItemScoreruser - The user ID for whom to generate scores.items - The item to score.@Nonnull public ResultMap scoreWithDetails(long user, @Nonnull java.util.Collection<java.lang.Long> items)
ItemScorerScore a collection of items and potentially return more details on the scores.
user - The user ID for whom to generate scores.items - The item to score.ResultMap that provides access to those details.