hanaml.FFT {hana.ml.r}R Documentation

FastFourierTransform(FFT)

Description

hanaml.FFT is a R wrapper for PAL fast-Fourier-transform.

Usage

hanaml.FFT(conn.context,
                                   data, key,
                                   num.type = NULL,
                                   inverse= NULL)

Arguments

conn.context

ConnectionContext
Connection to SAP HANA System

data

DataFrame
Dataset used for training the seasonality test model.

key

character
ID column of data that indicates the order of the sequence.

num.type

list of character, optional
Specify the number types(i.e. real or imaginary) of columns in data, e.g. num.type <- list(real = "COL1", imag = "COL2"), where "COL1" and "COL2" are assumed to be column names in data. If only one column is specified in num.type, only that column will be applied FFT.
If not provided, then data must contain exactly 3 columns, and the two non-ID columns will be treated as real, imaginary part of data respectively.

inverse

logical, optional
If FALSE, forward FFT is applied; otherwise inverse FFT is applied. Defaults to FALSE.

Value

DataFrame

Examples

## Not run: 
> data$collect()
ID  RE   IM
0   1  2.0  9.0
1   2  3.0 -3.0
2   3  5.0  0.0
3   4  0.0  0.0
4   5 -2.0 -2.0
5   6 -9.0 -7.0
6   7  7.0  0.0
 Create fast Fourier Transform instance:
 > result <-  hanaml.FFT(conn.context, data, key = "ID")

 Perform fit on the given data:
 > result$Collect()
ID   REAL        IMAG
0   1   6.000000   -3.000000
1   2   16.273688  -0.900317
2   3  -5.393946    26.265112
3   4  -13.883222   18.514840
4   5  -4.233990   -2.947800
5   6   9.657319    3.189618
6   7   5.580151    21.878547

## End(Not run)

[Package hana.ml.r version 1.0.8 Index]