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(UserEventDAO uedao) |
Modifier and Type | Method and Description |
---|---|
ResultMap |
predictWithDetails(long user,
Collection<Long> items)
Predict the user’s preference for a collection of items, potentially with additional details.
|
predict, predict
@Inject public KnownRatingRatingPredictor(UserEventDAO uedao)
@Nonnull public ResultMap predictWithDetails(long user, @Nonnull Collection<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.