@Shareable public class WeightedAverageNeighborhoodScorer extends Object implements NeighborhoodScorer, Serializable
Neighborhood scorer that computes the weighted average of neighbor scores.
Modifier and Type | Field and Description |
---|---|
static Symbol |
NEIGHBORHOOD_WEIGHT_SYMBOL |
Constructor and Description |
---|
WeightedAverageNeighborhoodScorer() |
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.
|
String |
toString() |
public static final Symbol NEIGHBORHOOD_WEIGHT_SYMBOL
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.