public class SlopeOneItemScorer extends AbstractItemScorer
ItemScorer
that implements the Slope One algorithm.Modifier and Type | Field and Description |
---|---|
protected PreferenceDomain |
domain |
protected SlopeOneModel |
model |
dao
Constructor and Description |
---|
SlopeOneItemScorer(DataAccessObject dao,
SlopeOneModel model,
PreferenceDomain dom) |
Modifier and Type | Method and Description |
---|---|
SlopeOneModel |
getModel() |
void |
score(UserHistory<? extends Event> history,
MutableSparseVector scores)
Score items in a vector.
|
canUseHistory, getUserHistory, score, score, score, score, score
protected SlopeOneModel model
protected final PreferenceDomain domain
@Inject public SlopeOneItemScorer(DataAccessObject dao, SlopeOneModel model, @Nullable PreferenceDomain dom)
public void score(@Nonnull UserHistory<? extends Event> history, @Nonnull MutableSparseVector scores)
ItemScorer
If the user has rated any items to be scored, the algorithm should not just use their rating as the score — it should compute a score in the normal fashion. If client code wants to substitute ratings, it is easy to do so as a separate step or wrapper interface.
history
- The user history.scores
- The score vector.public SlopeOneModel getModel()
Copyright © 2013 GroupLens Research. All Rights Reserved.