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