public class BiasUserVectorNormalizer extends AbstractUserVectorNormalizer
User vector normalizer that subtracts user-item biases.
Constructor and Description |
---|
BiasUserVectorNormalizer(BiasModel bias)
Construct a new normalizer.
|
Modifier and Type | Method and Description |
---|---|
InvertibleFunction<Long2DoubleMap,Long2DoubleMap> |
makeTransformation(long user,
Long2DoubleMap vector)
Make a vector transformation for a user.
|
VectorTransformation |
makeTransformation(long userId,
SparseVector vector)
Make a vector transformation for a user.
|
normalize
@Inject public BiasUserVectorNormalizer(BiasModel bias)
Construct a new normalizer.
bias
- The bias model to subtract from user vector values.public VectorTransformation makeTransformation(long userId, SparseVector vector)
UserVectorNormalizer
Make a vector transformation for a user. The resulting transformation will be applied to user vectors to normalize and denormalize them.
userId
- The user ID to normalize for.vector
- The user’s vector to use as the reference vector.public InvertibleFunction<Long2DoubleMap,Long2DoubleMap> makeTransformation(long user, Long2DoubleMap vector)
UserVectorNormalizer
Make a vector transformation for a user. The resulting transformation will be applied to user vectors to normalize and denormalize them.
user
- The user ID to normalize for.vector
- The user’s vector to use as the reference vector.