public static class PrecomputedItemScorer.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PrecomputedItemScorer.Builder |
addScore(long user,
long item,
double score)
Add a score.
|
PrecomputedItemScorer.Builder |
addUser(long user,
SparseVector usv)
Add an user's entire score vector to the mock scorer.
|
PrecomputedItemScorer |
build()
Construct the mock item scorer.
|
public PrecomputedItemScorer.Builder addUser(long user, SparseVector usv)
user
- The user.usv
- The vector of scores to use. This will replace any previously-added scores.public PrecomputedItemScorer.Builder addScore(long user, long item, double score)
user
- The user ID.item
- The item ID.score
- The score to return.public PrecomputedItemScorer build()