public class ItemItemScorer extends AbstractItemScorer implements ItemScorer
| Modifier and Type | Field and Description |
|---|---|
protected ItemScoreAlgorithm |
algorithm |
protected ItemItemModel |
model |
static Symbol |
NEIGHBORHOOD_SIZE_SYMBOL |
protected UserVectorNormalizer |
normalizer |
protected NeighborhoodScorer |
scorer |
protected UserHistorySummarizer |
summarizer |
| Constructor and Description |
|---|
ItemItemScorer(UserEventDAO dao,
ItemItemModel m,
UserHistorySummarizer sum,
NeighborhoodScorer scorer,
ItemScoreAlgorithm algo,
UserVectorNormalizer norm)
Construct a new item-item scorer.
|
| Modifier and Type | Method and Description |
|---|---|
UserVectorNormalizer |
getNormalizer() |
void |
score(long user,
MutableSparseVector scores)
Score items by computing predicted ratings.
|
score, scoreclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitscore, scorepublic static final Symbol NEIGHBORHOOD_SIZE_SYMBOL
protected final ItemItemModel model
@Nonnull protected final UserVectorNormalizer normalizer
protected final UserHistorySummarizer summarizer
@Nonnull protected final NeighborhoodScorer scorer
@Nonnull protected final ItemScoreAlgorithm algorithm
@Inject public ItemItemScorer(UserEventDAO dao, ItemItemModel m, UserHistorySummarizer sum, NeighborhoodScorer scorer, ItemScoreAlgorithm algo, UserVectorNormalizer norm)
dao - The DAO.m - The modelsum - The history summarizer.scorer - The neighborhood scorer.algo - The item scoring algorithm. It converts neighborhoods to scores.@Nonnull public UserVectorNormalizer getNormalizer()
public void score(long user,
@Nonnull
MutableSparseVector scores)
score in interface ItemScoreruser - The user ID.scores - The score vector.ItemScoreAlgorithm.scoreItems(ItemItemModel, SparseVector, MutableSparseVector, NeighborhoodScorer)