Class DCT

All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, Params, HasInputCol, HasOutputCol, DefaultParamsWritable, Identifiable, MLWritable, scala.Serializable

public class DCT extends UnaryTransformer<Vector,Vector,DCT> implements DefaultParamsWritable
A feature transformer that takes the 1D discrete cosine transform of a real vector. No zero padding is performed on the input vector. It returns a real vector of the same length representing the DCT. The return vector is scaled such that the transform matrix is unitary (aka scaled DCT-II).

More information on DCT-II in Discrete cosine transform (Wikipedia).

See Also:
  • Constructor Details

    • DCT

      public DCT(String uid)
    • DCT

      public DCT()
  • Method Details

    • load

      public static DCT load(String path)
    • read

      public static MLReader<T> read()
    • uid

      public String uid()
      Description copied from interface: Identifiable
      An immutable unique ID for the object and its derivatives.
      Specified by:
      uid in interface Identifiable
    • inverse

      public BooleanParam inverse()
      Indicates whether to perform the inverse DCT (true) or forward DCT (false). Default: false
    • setInverse

      public DCT setInverse(boolean value)
    • getInverse

      public boolean getInverse()
    • transformSchema

      public StructType transformSchema(StructType schema)
      Description copied from class: PipelineStage
      Check transform validity and derive the output schema from the input schema.

      We check validity for interactions between parameters during transformSchema and raise an exception if any parameter value is invalid. Parameter value checks which do not depend on other parameters are handled by Param.validate().

      Typical implementation should first conduct verification on schema change and parameter validity, including complex parameter interaction checks.

      transformSchema in class UnaryTransformer<Vector,Vector,DCT>
      schema - (undocumented)
    • toString

      public String toString()
      Specified by:
      toString in interface Identifiable
      toString in class Object