public class SlopeOneItemScorer extends AbstractItemScorer
ItemScorer
that implements the Slope One algorithm.Modifier and Type | Field and Description |
---|---|
protected UserEventDAO |
dao |
protected PreferenceDomain |
domain |
protected SlopeOneModel |
model |
Constructor and Description |
---|
SlopeOneItemScorer(UserEventDAO dao,
SlopeOneModel model,
PreferenceDomain dom) |
Modifier and Type | Method and Description |
---|---|
SlopeOneModel |
getModel() |
void |
score(long uid,
MutableSparseVector scores)
Score items in a vector.
|
score, score
protected final UserEventDAO dao
protected SlopeOneModel model
protected final PreferenceDomain domain
@Inject public SlopeOneItemScorer(UserEventDAO dao, SlopeOneModel model, @Nullable PreferenceDomain dom)
public void score(long uid, @Nonnull MutableSparseVector scores)
ItemScorer
uid
- The user ID.scores
- The score vector.public SlopeOneModel getModel()