public interface RatingPredictor
Predict user ratings. A rating predictor is like an ItemScorer
, but its output is scaled or otherwise transformed for rating prediction. An item score can be anything that meets the requirement ‘higher is better’; a rating prediction can be interpreted as an estimate of the user’s expected rating, within the system’s stated range of valid ratings. Depending on the predictor used, rating predictions may also be quantized.
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Long,java.lang.Double> |
predict(long user,
java.util.Collection<java.lang.Long> items)
Predict the user’s preference for a collection of items.
|
Result |
predict(long user,
long item)
Predict a user’s rating for a single item.
|
ResultMap |
predictWithDetails(long user,
java.util.Collection<java.lang.Long> items)
Predict the user’s preference for a collection of items, potentially with additional details.
|
Result predict(long user, long item)
Predict a user’s rating for a single item.
user
- The user ID for whom to generate a prediction.item
- The item ID whose rating is to be predicted.Double.NaN
if no preference can be predicted.@Nonnull java.util.Map<java.lang.Long,java.lang.Double> predict(long user, @Nonnull java.util.Collection<java.lang.Long> items)
Predict the user’s preference for a collection of items.
user
- The user ID for whom to generate predicts.items
- The items to predict for.@Nonnull ResultMap predictWithDetails(long user, @Nonnull java.util.Collection<java.lang.Long> items)
Predict the user’s preference for a collection of items, potentially with additional details.
user
- The user ID for whom to generate predicts.items
- The items to predict for.