public class DefaultItemScoreAlgorithm extends Object implements ItemScoreAlgorithm
NeighborhoodSize
neighbors to
score each item.Constructor and Description |
---|
DefaultItemScoreAlgorithm(int n,
int min) |
Modifier and Type | Method and Description |
---|---|
void |
scoreItems(ItemItemModel model,
SparseVector userData,
MutableSparseVector scores,
NeighborhoodScorer scorer)
Score items for a user.
|
@Inject public DefaultItemScoreAlgorithm(@NeighborhoodSize int n, @MinNeighbors int min)
public void scoreItems(ItemItemModel model, SparseVector userData, MutableSparseVector scores, NeighborhoodScorer scorer)
ItemScoreAlgorithm
scoreItems
in interface ItemScoreAlgorithm
model
- The item-item model.userData
- The user's rating data.scores
- The score vector (key domain is items to score). Unscoreable items will be
left unchanged.scorer
- The scorer to use.