org.apache.spark.mllib.feature
Class ElementwiseProduct

Object
  extended by org.apache.spark.mllib.feature.ElementwiseProduct
All Implemented Interfaces:
java.io.Serializable, VectorTransformer

public class ElementwiseProduct
extends Object
implements VectorTransformer

:: Experimental :: Outputs the Hadamard product (i.e., the element-wise product) of each input vector with a provided "weight" vector. In other words, it scales each column of the dataset by a scalar multiplier. param: scalingVec The values used to scale the reference vector's individual components.

See Also:
Serialized Form

Constructor Summary
ElementwiseProduct(Vector scalingVec)
           
 
Method Summary
 Vector scalingVec()
           
 Vector transform(Vector vector)
          Does the hadamard product transformation.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.mllib.feature.VectorTransformer
transform, transform
 

Constructor Detail

ElementwiseProduct

public ElementwiseProduct(Vector scalingVec)
Method Detail

scalingVec

public Vector scalingVec()

transform

public Vector transform(Vector vector)
Does the hadamard product transformation.

Specified by:
transform in interface VectorTransformer
Parameters:
vector - vector to be transformed.
Returns:
transformed vector.