@DefaultImplementation(value=WeightedAverageNeighborhoodScorer.class) public interface NeighborhoodScorer
Compute scores from neighborhoods and score vectors.
This interface encapsulates aggregating user scores and item similarities into a final score. The neighborhood is pre-filtered to only contain items for which scores are available, and truncated to the neighborhood size, so all functions implementing this interface need to do is accumulate scores.
| 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.
|
void score(long item,
Long2DoubleMap neighbors,
Long2DoubleMap scores,
ItemItemScoreAccumulator accum)
Compute a score based on similar neighbors and their corresponding scores.
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.