@Shareable public class WeightedAverageNeighborhoodScorer extends java.lang.Object implements NeighborhoodScorer, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static Symbol |
NEIGHBORHOOD_WEIGHT_SYMBOL |
Constructor and Description |
---|
WeightedAverageNeighborhoodScorer() |
Modifier and Type | Method and Description |
---|---|
ScoredId |
score(long item,
java.lang.Iterable<ScoredId> neighbors,
SparseVector scores)
Compute a score based on similar neighbors and their corresponding
scores.
|
java.lang.String |
toString() |
public static final Symbol NEIGHBORHOOD_WEIGHT_SYMBOL
public ScoredId score(long item, java.lang.Iterable<ScoredId> neighbors, SparseVector scores)
NeighborhoodScorer
score
in interface NeighborhoodScorer
neighbors
- A vector of neighbors with similarity measures.scores
- A vector of item scores. It should contain a score for
every item in neighbors.null
if
no score could be computed.public java.lang.String toString()
toString
in class java.lang.Object