Singular Spectrum Analysis

Article author: Artem Mikhailov

Singular spectrum analysis (SSA) is a time series analysis technique that uses linear algebra and signal theory to extract information from data. The essence of the method is that the time series is divided into singular value decomposition components and then these components are used for analysis and forecasting.

SSA is widely used in various fields such as transport accessibility, economic data analysis, equipment health monitoring, and others.

One of the advantages of SSA is its ability to work with short and incomplete data, which makes it particularly useful for analyzing a series that is a mixture of different signals. In addition, SSA also has its limitations, mainly related to some of the assumptions that are made during the analysis. In particular, SSA assumes that the time series has stationary and weakly dependent components.

Overall, SSA is a powerful data analysis tool that can complement and enhance existing analysis methods. Properly applied, SSA can make a valuable contribution to understanding the complex processes that can influence the behavior of a series.

How SSA works

The operating principle of singular spectral analysis (SSA) is to decompose a time series into its components, called empirical components (EC).

First, we break the time series into window sequences, then each sequence is converted into a trajectory matrix. A trajectory matrix is ​​a matrix in which time is represented as rows and the interaction between elements of the time sequence as columns.

Then, using the singular value decomposition of the trajectory matrix, one can extract the empirical components of the series. Singular value decomposition is a technique for approximating a matrix through a linear combination of basis vectors. In our case, the basis vectors are obtained from the diagonal elements of the matrix of singular values, and the empirical components are obtained from the product of the matrix of left singular vectors by the transposed matrix of right singular vectors.

Each empirical component contains information about a series of a certain frequency and length within a windowed sequence. Thus, we can divide the time series into separate components that can be analyzed and used for forecasting. The application of SSA includes the analysis, forecasting and extraction of information from various types of time series. SSA can be used to predict the future values ​​of a time series, as well as to analyze and extract information from long, complex time series. SSA can also be applied to multivariate time series analysis.

Description of analysis steps

  1. Formation of the trajectory matrix. Initially, the time series is divided into fixed windows of the same length, and then a trajectory matrix is ​​formed from the windows. Thus, each row of the matrix is ​​a vector with the values ​​of the time series, which corresponds to one of the windows. The number of rows in the matrix corresponds to the size of the windows, and the number of columns to the size of the time series.

  2. Decomposition of the trajectory matrix into singular vectors and values. In order to analyze the time series, the trajectory matrix must first be decomposed into singular values ​​and vectors. Singular value decomposition (SVD) can be applied to the trajectory matrix since it is a matrix that can be represented as a product of three matrices. The decomposition yields singular vectors and values.

  3. Selection of cycle elements and trends from singular vectors.

    At this stage, the selection of singular values ​​and their corresponding singular vectors from the trajectory matrix is ​​performed. This is done in such a way as to select the vectors that best fit the cyclic or linear components of the time series. The SSA method allows you to select the most important components of the series based on statistical criteria that help determine which cycles and trends in the data are statistically significant and which can be attributed to noise. Singular vectors and values ​​corresponding to the selected components are used in the next step to restore the cyclic and linear components of the series.

  4. After we have chosen a certain number of singular values ​​and their corresponding singular vectors, the next step is to restore the cycle and trend.

    To restore the cycle and trend, we use the multiplication of the selected singular vectors and values. The recovered cycle components and trends can be used for further analysis and forecasting of the time series. The reconstructed cycle shows recurring patterns in the data, such as seasonality. A trend shows the general direction in which the data is moving, such as rising or falling.

    In addition, you can restore the residual series by subtracting the restored cycle and trend from the original series. The residual series reflects the variance of the time series that has not been explained by cycle and trend.

    Cycle and trend recovery is an important step in time series analysis and can help you understand the main influencing factors and predict the future values ​​of the time series.

  5. Extraction of noise from the time series. Once the cycle and trend are restored, they can be subtracted from the original time series to get noise. This noise will help you better understand the various patterns that may be hidden in the data.

Advantages and disadvantages

One of the limitations of SSA is the need to know the length of the original sequence and the choice of window dimensions, which can be difficult when the length of the series can be variable or unknown. Also, SSA requires that the data be stationary, otherwise the method may give incorrect results.

Another disadvantage of SSA is its computational complexity. The decomposition of the time series into components occurs by calculating the covariance matrices, which can be time consuming, especially for large series. In addition, SSA tends to overfit – when the method “tunes” for noise and is unstable to small changes in the data. Finally, SSA is not always flexible enough to analyze complex time series such as multivariate and non-linear series.

Application examples

Singular spectrum analysis (SSA) can be applied in many areas, greatly facilitating the analysis of data with a large number of dimensions and complex structure. Let’s look at a few examples where SSA is used to analyze various types of data:

  1. Time Series Analysis: SSA can be used to analyze time series such as commodity price indices, exchange rates, or meteorological data. For example, SSA can be used to highlight cycles and trends in a stock index to highlight periodic movements in stock prices and examine their causes.

  2. Image processing: SSA can be applied to images to analyze their main components and highlight structures. For example, SSA can be used to analyze satellite imagery, where SSA can help isolate the main components of the images and remove distortion noise due to changes in the angle of the satellite’s curvature.

  3. Audio processing: SSA can be used to analyze audio signals, such as speech recognition or music processing. SSA can highlight the harmonic components of a sound, such as chords in music, and indicate trends in speech to better understand what people are talking about.

  4. Economic data analysis: SSA can be used to analyze statistical data, such as forecasting economic performance. For example, SSA can be used to analyze store sales data to highlight key components, identify peak demand moments, and prepare for the next market trends.

Conclusion

In conclusion, Singular Spectrum Analysis is a powerful time series analysis technique that can be used in various fields, from hydrology and climatology to economics and finance. SSA allows you to identify hidden cycles, trends and patterns in data, which allows you to predict the future values ​​of time series and make informed decisions based on the results. However, like any other method, SSA has its limitations and requires certain knowledge and skills to apply it. In general, Singular Spectral Analysis is an effective and promising tool for time series analysis, which will certainly be developed and improved in the future.

Lastly, I would like to recommend free webinar from OTUS, where teachers will show you how to set up PostgreSQL monitoring using grafana and Prometheus.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *