@Shareable public class BaselineSubtractingUserVectorNormalizer extends AbstractUserVectorNormalizer implements Serializable
Modifier and Type | Field and Description |
---|---|
protected ItemScorer |
baselineScorer |
Constructor and Description |
---|
BaselineSubtractingUserVectorNormalizer(ItemScorer baseline)
Create a new baseline-subtracting normalizer with the given baseline.
|
Modifier and Type | Method and Description |
---|---|
VectorTransformation |
makeTransformation(long user,
SparseVector ratings)
Make a vector transformation for a user.
|
String |
toString() |
normalize
protected final ItemScorer baselineScorer
@Inject public BaselineSubtractingUserVectorNormalizer(@BaselineScorer ItemScorer baseline)
baseline
- The baseline scorer to use for normalization.public VectorTransformation makeTransformation(long user, SparseVector ratings)
UserVectorNormalizer
makeTransformation
in interface UserVectorNormalizer
user
- The user ID to normalize for.ratings
- The user's vector to use as the reference vector.