public class UserMeanItemScorer extends AbstractItemScorer
This scorer does not directly average the user's ratings; rather, it averages their offsets
from the scores produced by another scorer (the UserMeanBaseline). If this is the
GlobalMeanRatingItemScorer (the default), then this is a straight user mean item
scorer with damping; reconfigure it to use ItemMeanRatingItemScorer as the baseline to
get a user-item personalized mean.
This is why it is not called a mean rating item scorer; it can compute the mean of any kind of user-based score.
| Constructor and Description |
|---|
UserMeanItemScorer(UserEventDAO dao,
ItemScorer base,
UserHistorySummarizer sum,
double damp)
Construct a scorer that computes user means offset by the global mean.
|
| Modifier and Type | Method and Description |
|---|---|
void |
score(long user,
MutableSparseVector items)
Score items in a vector.
|
String |
toString() |
score, score@Inject public UserMeanItemScorer(UserEventDAO dao, @UserMeanBaseline ItemScorer base, UserHistorySummarizer sum, @MeanDamping double damp)
dao - The DAO to get user ratings.base - An item scorer that provides the baseline scores.sum - The summarizer for getting user histories.damp - A damping term for the calculations.public void score(long user,
@Nonnull
MutableSparseVector items)
ItemScoreruser - The user ID.items - The score vector.