Applies unit length normalization on a vector.
Applies unit length normalization on a vector.
vector to be normalized.
normalized vector. If the norm of the input is zero, it will return the input vector.
Applies transformation on an JavaRDD[Vector].
Applies transformation on an JavaRDD[Vector].
JavaRDD[Vector] to be transformed.
transformed JavaRDD[Vector].
Applies transformation on an RDD[Vector].
Applies transformation on an RDD[Vector].
RDD[Vector] to be transformed.
transformed RDD[Vector].
:: Experimental :: Normalizes samples individually to unit Lp norm
For any 1 <= p < Double.PositiveInfinity, normalizes samples using sum(abs(vector).p)(1/p) as norm.
For p = Double.PositiveInfinity, max(abs(vector)) will be used as norm for normalization.