public abstract class AbstractVectorNormalizer extends Object implements VectorNormalizer
|Constructor and Description|
|Modifier and Type||Method and Description|
Normalize a vector in-place with a reference vector.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MutableSparseVector normalize(@Nonnull SparseVector reference, @Nullable MutableSparseVector target)
To understand the relationship of reference and vector, consider wanting to subtract the user's mean rating from a set of ratings. To do that, the user's rating vector is reference, and the vector of ratings to be adjusted is vector.
This method is equivalent to
reference- The reference used to compute whatever transformation is needed (e.g. the mean value).
target- The vector to normalize. If
null, a new mutable copy of reference is created.