hanaml.Periodogram.Rd
hanaml.Periodogram is a R wrapper for SAP HANA PAL Partition algorithm. Periodogram is an estimate of the spectral density of a signal.
hanaml.Periodogram(
data,
key = NULL,
endog = NULL,
sampling.rate = NULL,
num.fft = NULL,
freq.range = NULL,
spectrum.type = NULL,
window = NULL,
alpha = NULL,
beta = NULL,
attenuation = NULL,
mode = NULL,
precision = NULL,
r = NULL
)
DataFrame
DataFrame containting the data.
character
Name of the ID column.
character, optional
The endogenous variable, i.e. time series.
Defaults to the first non-ID column.
double, optional
Sampling frequency of the sequence.
Defaults to 1.0.
integer, optional
Number of DFT points. If num.fft
is smaller than the length of the input, the input is cropped. If it is larger, the input is padded with zeros.
Defaults to the length of sequence.
c("one.sides", "two.sides"), optional
Indicates result frequency range.
Defaults to "one.sides".
c("density", "spectrum"), optional
Indicates power spectrum scaling type.
Defaults to "density".
character, optional
Available input window type:
'none'
'bartlett'
'bartlett.hann'
'blackman'
'blackman.harris'
'bohman'
'chebwin'
'cosine'
'flattop'
'gaussian'
'hamming'
'hann'
'kaiser'
'nuttall'
'parzen'
'tukey'
No default value.
double, optional
Window parameter. Only valid for Blackman and Gaussian window.
Defaults to "Blackman":0.16, "Gaussian":2.5.
double, optional
Parameter for Kaiser Window. Only valid for Kaiser window.
Defaults to 8.6.
double, optional
Parameter for Chebwin. Only valid for Chebwin window.
Defaults to 50.0.
c('symmetric', 'periodic'), optional
Parameter for Flattop Window. Only valid for Flattop window.
Defaults to 'symmetric'.
c('none', 'octave'), optional
Parameter for Flattop Window. Only valid for Flattop window.
Defaults to 'none'.
double, optional
Parameter for Tukey Window. Only valid for Tukey window.
Defaults to 0.5.
DataFrames
Result, structured as follows:
ID: ID column.
FREQ: Value of sample frequencies.
PXX: Power spectral density or power spectrum of input data.
Time series data:
> data$collect()
ID X
0 1 -2.0
1 2 8.0
2 3 6.0
3 4 4.0
4 5 1.0
5 6 0.0
6 7 3.0
7 8 5.0
Call the function:
> res <- hanaml.Periodogram(data=data,
key='ID',
endog='X',
sampling.rate=100,
window="hamming",
freq.range="two.sides")
Output:
> res$Collect()
ID FREQ PXX
0 1 0.0 0.449371
1 2 12.5 0.072737
2 3 25.0 0.075790
3 4 37.5 0.006659
4 5 -50.0 0.000960
5 6 -37.5 0.006659
6 7 -25.0 0.075790
7 8 -12.5 0.072737