DCT

Applies discrete cosine transform (DCT) to vector columns.

This operation is ported from Spark ML.

For a comprehensive introduction, see Spark documentation.

For scala docs details, see org.apache.spark.ml.feature.DCT documentation.

Since: Seahorse 1.0.0

Input

Port Type Qualifier Description
0DataFrameThe input DataFrame.

Output

Port Type Qualifier Description
0DataFrameThe output DataFrame.
1TransformerA Transformer that allows to apply the operation on other DataFrames using a Transform.

Parameters

Name Type Description
inverse Boolean Indicates whether to perform the inverse DCT (true) or forward DCT (false).
operate on InputOutputColumnSelector The input and output columns for the operation.

Example

Parameters

Name Value
inverse false
operate on one column
input column "features"
output append new column
output column "output"

Input

features
[0.0,1.0,-2.0,3.0]
[-1.0,2.0,4.0,-7.0]
[14.0,-2.0,-5.0,1.0]

Output

features output
[0.0,1.0,-2.0,3.0] [1.0,-1.1480502970952693,2.0000000000000004,-2.7716385975338604]
[-1.0,2.0,4.0,-7.0] [-1.0,3.378492794482933,-7.000000000000001,2.9301512653149677]
[14.0,-2.0,-5.0,1.0] [4.0,9.304453421915744,11.000000000000002,1.5579302036357163]