public class RatingPredictorItemScorer extends java.lang.Object implements ItemScorer
| Constructor and Description |
|---|
RatingPredictorItemScorer(RatingPredictor pred) |
| Modifier and Type | Method and Description |
|---|---|
SparseVector |
score(long user,
java.util.Collection<java.lang.Long> items)
Score a collection of items.
|
double |
score(long user,
long item)
Score a single item.
|
void |
score(long user,
MutableSparseVector scores)
Score items in a vector.
|
@Inject public RatingPredictorItemScorer(RatingPredictor pred)
public double score(long user,
long item)
ItemScorerscore in interface ItemScoreruser - The user ID for whom to generate a score.item - The item ID to score.Double.NaN if no score can be generated.@Nonnull public SparseVector score(long user, @Nonnull java.util.Collection<java.lang.Long> items)
ItemScorerscore in interface ItemScoreruser - The user ID for whom to generate scores.items - The item to score.public void score(long user,
@Nonnull
MutableSparseVector scores)
ItemScorerscore in interface ItemScoreruser - The user ID.scores - The score vector.