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

Seasonality Test

Description

hanaml.SeasonalDecompose is a R wrapper for PAL Seasonality Test.

Usage

hanaml.SeasonalDecompose(conn.context,
                         data,
                         key = NULL,
                         endog = NULL,
                         alpha = NULL,
                         thread.ratio = NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

key

character, optional
The ID column.
Defaults to the first column.

endog

character, optional
The endogenous variable of the given time series in data.
Defaults to the first non-ID column.

alpha

double, optional
The criterion for the autocorrelation coefficient. The value range is (0, 1). A larger value indicates stricter requirement for seasonality.
Defaults to 0.2.

thread.ratio

double, optional
Controls the proportion of available threads to use. The ratio of available threads.

  • 0: single thread.

  • 0~1: percentage.

  • Others: heuristically determined.

Defaults to -1.

Value

List of DataFrame:

Examples

## Not run: 
Input data:
> data$Collect()
        TIMESTAMP     Y
      1          1   10
      2          2    7
      3          3   17
      4          4   34
      5          5    9
      ......
      31        31   83
      32        32   55
      33        33  207
      34        34   25
      35        35    0
      36        36    0

Invoke the function:
> sd <- hanaml.SeasonalDecompose(conn,
                                 data,
                                 thread.ratio = 0.5,
                                 alpha = 0.2)

Output:
> sd[[1]]$Collect()
  STAT_NAME     STAT_VALUE
1      type multiplicative
2    period              4
3       acf       0.501947

> sd[[2]]$Collect()
   TIMESTAMP  SEASONAL   TREND    RANDOM
1          1 1.2526605  10.125 0.7884453
2          2 0.3499516  14.000 1.4287688
3          3 0.7488509  16.875 1.3452711
4          4 1.6485370  16.750 1.2313043
......
33        33 1.2526605  82.125 2.0121557
34        34 0.3499516  64.875 1.1011706
35        35 0.7488509  32.125 0.0000000
36        36 1.6485370   3.125 0.0000000

## End(Not run)

[Package hana.ml.r version 1.0.8 Index]