org.apache.spark.mllib.feature
Class ElementwiseProduct
Object
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
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementwiseProduct
public ElementwiseProduct(Vector scalingVec)
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.