class Normalizer extends VectorTransformer
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.
- Annotations
- @Since( "1.1.0" )
- Source
- Normalizer.scala
- Alphabetic
- By Inheritance
- Normalizer
- VectorTransformer
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transform(vector: Vector): Vector
Applies unit length normalization on a vector.
Applies unit length normalization on a vector.
- vector
vector to be normalized.
- returns
normalized vector. If the norm of the input is zero, it will return the input vector.
- Definition Classes
- Normalizer → VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
def
transform(data: JavaRDD[Vector]): JavaRDD[Vector]
Applies transformation on a JavaRDD[Vector].
Applies transformation on a JavaRDD[Vector].
- data
JavaRDD[Vector] to be transformed.
- returns
transformed JavaRDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
def
transform(data: RDD[Vector]): RDD[Vector]
Applies transformation on an RDD[Vector].
Applies transformation on an RDD[Vector].
- data
RDD[Vector] to be transformed.
- returns
transformed RDD[Vector].
- Definition Classes
- VectorTransformer
- Annotations
- @Since( "1.1.0" )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()