org.lenskit.transform.normalize

## Interface ItemVectorNormalizer

• ### Method Summary

All Methods
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)
Deprecated.
MutableSparseVector normalize(long itemId, SparseVector vector, MutableSparseVector target)
Deprecated.
Old vectors are going away.
• ### Method Detail

• #### normalize

@Deprecated
MutableSparseVector normalize(long itemId,
@Nonnull
SparseVector vector,
@Nullable
MutableSparseVector target)
Deprecated. Old vectors are going away.

Normalize a vector with respect to an item vector.

Parameters:
itemId - The item id to normalize a vector for.
vector - The item’s vector for reference.
target - The vector to normalize. If null, the item vector is normalized.
Returns:
The target vector, if specified. Otherwise, a fresh mutable vector containing a normalized copy of the item vector is returned.
• #### makeTransformation

@Deprecated
VectorTransformation makeTransformation(long itemId,
SparseVector vector)
Deprecated.

Make a vector transformation for an item. The resulting transformation will be applied to item vectors to normalize and denormalize them.

Parameters:
itemId - The item id to normalize for.
vector - The item’s vector to use as the reference vector.
Returns:
The vector transformaition normalizing for this item.
• #### makeTransformation

InvertibleFunction<Long2DoubleMap,Long2DoubleMap> makeTransformation(long itemId,
Long2DoubleMap vector)

Make a vector transformation for a item. The resulting transformation will be applied to item vectors to normalize and denormalize them.

Parameters:
itemId - The item ID to normalize for.
vector - The item’s vector to use as the reference vector.
Returns:
The vector transformation normalizing for this item.