Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Decomposition | Time Series Processing
Time Series Analysis
course content

Зміст курсу

Time Series Analysis

Time Series Analysis

1. Time Series: Let's Start
2. Time Series Processing
3. Time Series Visualization
4. Stationary Models
5. Non-Stationary Models
6. Solve Real Problems

bookDecomposition

Decomposition is a time series analysis technique that allows you to decompose a series into several components: seasonality, noise, and trends.

Let's take supermarket sales as an example.

Speaking of seasonality, sales have daily seasonality (the number of purchases increases in the evening and may be less in the morning), weekly seasonality (most purchases are made on Fridays and weekends), and monthly seasonality (for example, more purchases are made during the holiday months: December, January).

Let's shed some light on the mathematical model of the decomposition method:

As we can see, the coefficients T, S, and R are responsible for each parameter.

You can see the main difference between trend and seasonality below:

While a trend is a general systematic linear or non-linear component, a seasonal component is recurring. Both of these types of components can be present in the time series at the same time.

To run the decomposition method, we will use the MSTL method, which stands for Multiple Seasonal-Trend decomposition using Loess. Import statsmodel to run time series decomposition:

As a result, we have the following:

With the help of this visualization, we can already track the overall upward trend and seasonality. In the general case, decomposition can help us move from the analysis of a non-stationary series to a stationary one, excluding the seasonal component and the trend, we can analyze the series using residuals.

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 4
some-alt