@Immutable @Shareable public class WeightedAverageUserNeighborhoodScorer extends java.lang.Object implements UserNeighborhoodScorer, java.io.Serializable
Score an item using the weighted average of neighbor ratings.
Constructor and Description |
---|
WeightedAverageUserNeighborhoodScorer(int min)
Construct a weighted average scorer.
|
Modifier and Type | Method and Description |
---|---|
UserUserResult |
score(long item,
java.util.List<Neighbor> neighbors)
Compute the score for an item given a list of neighbors.
|
@Inject public WeightedAverageUserNeighborhoodScorer(@MinNeighbors int min)
Construct a weighted average scorer.
min
- The minimum neighbors.@Nullable public UserUserResult score(long item, java.util.List<Neighbor> neighbors)
UserNeighborhoodScorer
Compute the score for an item given a list of neighbors.
score
in interface UserNeighborhoodScorer
item
- The item to score.neighbors
- The list of neighbors.null
.