Class ElementwiseProduct

Object
org.apache.spark.mllib.feature.ElementwiseProduct
All Implemented Interfaces:
Serializable, VectorTransformer

public class ElementwiseProduct extends Object implements VectorTransformer
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:
  • Constructor Details

    • ElementwiseProduct

      public ElementwiseProduct(Vector scalingVec)
  • Method Details

    • 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.