Method of Harmonics Parameters Identification and Anomalies of a Periodic Time Series Based on Adaptive Decomposition

D. O. Shmundiak, В. Б. Мокін · Visnyk of Vinnytsia Politechnical Institute · 2023

Periodic time series have many applications — financial indicators, indicators of air quality, indicators of the state of water, etc. Accordingly, simulation of time series and pattern analysis are relevant and quite common tasks for understanding possible trends and changes for correct and timely actions. Important parameters of periodic time series are their trends, seasonal components, and anomalies. There exist numerous methods to determine the trend of a time series, but when it comes to the simultaneous identification of parameters of various types of seasonality and anomalies of different nature in different periods, this task is not trivial and there is no universal solution for this problem. Most of the solutions are specific to a specific subject area or demonstrate insufficient adequacy and accuracy of approximation. New method of identifying parameters of harmonics and anomalies of a periodic time series, based on the adaptive decomposition of the series, has been developed. It is proposed to decompose a given time series with a period up to half of the total number of time series records and to plot the ratio of the amplitudes of the seasonal component to the amplitudes of the series itself — the so-called “decomposition curve”. Then, smooth this curve and find local maxima, which are proposed to be considered as corresponding to the period of possible types of seasonality of the series. Considering many years of experience using the Facebook Prophet model, a set of relations between values of the seasonality period, the order of the Fourier series for its approximation, and the degree of regularization that should be taken into account are proposed. For each type of seasonality in each period, one of the known methods should be used to find anomalous data and check their statistical significance. Statistically significant anomalies are collected in a combined set with typical parameters. A few possible variants of the structures of such time series models are proposed. The algorithm of the method is developed, and its main components are described. The offered method was tested in Python in the notebook of the Kaggle platform. This notebook uses the Facebook Prophet model on real data of air quality observations obtained from one of the EcoCity public monitoring network stations within the international program “Clean Air for Ukraine”. Tests showed that compared to the model with default parameters and default parameters of seasonality, the optimal model of the proposed method improved the accuracy of the approximation for the R2 metric — by 1,7 times, and for the MSE metric — by 2 times. This confirms the effectiveness of the offered method.

Read the paper · More papers on PaperTik