public class KnownRatingRatingPredictor extends AbstractRatingPredictor
Use a user’s existing ratings as predictions. This rating predictor returns the user’s rating as a prediction for all items the user has rated, and returns no prediction for items the user has rated. It is useful in conjunction with a FallbackItemScorer
to return a user’s rating when it is known.
RatingPredictorItemScorer
Constructor and Description |
---|
KnownRatingRatingPredictor(DataAccessObject d) |
Modifier and Type | Method and Description |
---|---|
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.
|
predict, predict
@Inject public KnownRatingRatingPredictor(DataAccessObject d)
@Nonnull public ResultMap predictWithDetails(long user, @Nonnull java.util.Collection<java.lang.Long> items)
RatingPredictor
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.