@Shareable public class SimilaritySumNeighborhoodScorer extends java.lang.Object implements NeighborhoodScorer, java.io.Serializable
Neighborhood scorer that computes the sum of neighborhood similarities.
Constructor and Description |
---|
SimilaritySumNeighborhoodScorer() |
Modifier and Type | Method and Description |
---|---|
void |
score(long item,
Long2DoubleMap neighbors,
Long2DoubleMap scores,
ItemItemScoreAccumulator accum)
Compute a score based on similar neighbors and their corresponding scores.
|
java.lang.String |
toString() |
public void score(long item, Long2DoubleMap neighbors, Long2DoubleMap scores, ItemItemScoreAccumulator accum)
NeighborhoodScorer
Compute a score based on similar neighbors and their corresponding scores.
score
in interface NeighborhoodScorer
item
- The item ID to score.neighbors
- A vector of neighbors with similarity measures.scores
- A vector of item scores. It should contain a score for every item in neighbors.accum
- An accumulator to receive the score computed by this method.public java.lang.String toString()
toString
in class java.lang.Object