public abstract class AbstractRatingPredictor extends Object implements RatingPredictor
RatingPredictor.predict(long, MutableSparseVector)
.Constructor and Description |
---|
AbstractRatingPredictor() |
Modifier and Type | Method and Description |
---|---|
SparseVector |
predict(long user,
Collection<Long> items)
Predict the user's preference for a collection of items.
|
double |
predict(long user,
long item)
Predict a user's rating for a single item.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
predict
@Nonnull public SparseVector predict(long user, @Nonnull Collection<Long> items)
Delegates to RatingPredictor.predict(long, MutableSparseVector)
.
predict
in interface RatingPredictor
user
- The user ID for whom to generate predicts.items
- The items to predict for.public double predict(long user, long item)
Delegates to predict(long, java.util.Collection)
.
predict
in interface RatingPredictor
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.