public class SlopeOneItemScorer extends AbstractItemScorer
An ItemScorer
that implements the Slope One algorithm.
Modifier and Type | Field and Description |
---|---|
protected RatingVectorPDAO |
dao |
protected PreferenceDomain |
domain |
protected SlopeOneModel |
model |
Constructor and Description |
---|
SlopeOneItemScorer(RatingVectorPDAO dao,
SlopeOneModel model,
PreferenceDomain dom) |
Modifier and Type | Method and Description |
---|---|
SlopeOneModel |
getModel() |
ResultMap |
scoreWithDetails(long user,
java.util.Collection<java.lang.Long> items)
Score a collection of items and potentially return more details on the scores.
|
score, score
protected final RatingVectorPDAO dao
protected SlopeOneModel model
protected final PreferenceDomain domain
@Inject public SlopeOneItemScorer(RatingVectorPDAO dao, SlopeOneModel model, @Nullable PreferenceDomain dom)
@Nonnull public ResultMap scoreWithDetails(long user, @Nonnull java.util.Collection<java.lang.Long> items)
ItemScorer
Score a collection of items and potentially return more details on the scores.
user
- The user ID for whom to generate scores.items
- The item to score.ResultMap
that provides access to those details.public SlopeOneModel getModel()