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.
|
@Inject public BiasItemVectorNormalizer(BiasModel bias)
Construct a new normalizer.
bias
- The bias model to subtract from item vector values.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.