@DefaultProvider(value=LeastSquaresItemScorer.Builder.class) @Shareable public class LeastSquaresItemScorer extends AbstractItemScorer implements java.io.Serializable
Baseline scorer using least-squares estimates of preferences, trained by gradient descent.
| Modifier and Type | Class and Description |
|---|---|
static class |
LeastSquaresItemScorer.Builder
The builder for the least squares predictor.
|
| Constructor and Description |
|---|
LeastSquaresItemScorer(Long2DoubleMap ubs,
Long2DoubleMap ibs,
double mean)
Construct a new least-squares scorer.
|
| Modifier and Type | Method and Description |
|---|---|
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, scorepublic LeastSquaresItemScorer(Long2DoubleMap ubs, Long2DoubleMap ibs, double mean)
Construct a new least-squares scorer.
ubs - the user biasesibs - the item biasesmean - the global mean rating@Nonnull public ResultMap scoreWithDetails(long user, @Nonnull java.util.Collection<java.lang.Long> items)
ItemScorerScore a collection of items and potentially return more details on the scores.
scoreWithDetails in interface ItemScoreruser - The user ID for whom to generate scores.items - The item to score.ResultMap that provides access to those details.