Windowing module
A common parameter in many time series anomaly detection algorithms is the window size. This module functionality to create a sliding window, but also to automatically compute the window size. It can be imported as follows:
>>> from dtaianomaly import windowing
The available identifiers for automatically computing the window size for a given time series can be accessed as follows:
>>> from dtaianomaly.windowing import AUTO_WINDOW_SIZE_COMPUTATION
>>> AUTO_WINDOW_SIZE_COMPUTATION
['fft', 'acf', 'mwf', 'suss']
A predefined type is declared for the valid window sizes which can be passed
to compute_window_size():
>>> from dtaianomaly.windowing import WINDOW_SIZE_TYPE
>>> WINDOW_SIZE_TYPE
int | typing.Literal['fft', 'acf', 'mwf', 'suss']
Note
The implementations in this module are based on the following repository: https://github.com/ermshaua/window-size-selection
Base functions
|
Construct a sliding window for the given time series. |
Reverse the sliding window. |
Automatically computing the window size
|
Compute the window size of the given time series [11]. |
|
Compute the window size by selecting the dominant Fourier frequency. |
|
Compute the window size as the leg with the highest autocorrelation. |
|
Compute the window size using the Multi-Window-Finder method [18]. |
|
Compute the window size using the Summary Statistics Subsequence method [10]. |