stationarity_test
- hana_ml.algorithms.pal.tsa.stationarity_test.stationarity_test(data, key=None, endog=None, method=None, mode=None, lag=None, probability=None)
A stationarity test is a statistical test used in time series analysis to determine whether a given time series is stationary or non-stationary. A time series is considered stationary if its statistical properties such as mean, variance, and autocorrelation remain constant over time. This is an important assumption for many time series models because they rely on the predictability of patterns that do not change with time.
- Parameters:
- dataDataFrame
Input data.
- keystr, optional
The ID (Time stamp) column. ID does not need to be in order, but must be unique and equal sampling. The supported data type is INTEGER.
Defaults to the first column of data if the index column of data is not provided. Otherwise, defaults to the index column of data.
- endogstr, optional
The column of series to be tested.
Defaults to the first non-key column.
- method{"kpss", "adf"}, optional
Statistic test that used to determine stationarity.
Defaults "kpss".
- mode{"level", "trend", "no"}, optional
Type of stationarity to determine. Note that option "no" is not applicable to "kpss".
Defaults to "level".
- lagint, optional
The lag order to calculate the test statistic.
Default value is "kpss": int(12*(data_length / 100)^0.25" ) and "adf": int(4*(data_length / 100)^(2/9)).
- probabilityfloat, optional
The confidence level for confirming stationarity.
Defaults to 0.9.
- Returns:
- DataFrame
Statistics.
Examples
>>> stats = stationarity_test(data=df, key='ID',endog='SERIES', method='kpss', mode='trend', lag=5, probability=0.95) >>> stats.collect()