Time series mining-prediction algorithm-cubic exponential smoothing (Holt-Winters)

Source: Internet
Author: User

In a time series, we need to predict its future trend based on the existing data of the time series. The Three exponent Smoothing (Triple/Three Order Exponential Smoothing, Holt-Winters) the algorithm can well predict the time series.

Time series data generally has the following characteristics: 1. Trend (Trend) 2. Seasonal (Seasonality ).

The trend describes the overall trend of the time series, such as the overall increase or decrease. The time series shown in the figure is the overall increase:

Seasonal data fluctuations, such as the cycle of year or week, are described as follows:

The cubic exponential smoothing algorithm can predict time series with both trend and seasonal. This algorithm is based on the primary exponential smoothing and secondary exponential smoothing algorithms.

Exponential Smoothing AlgorithmBased on the following recursive relationship:

Si = α xi + (1-α) Si-1

Alpha isSmoothing parameters, Si is the smoothing value of the previous I data. The value is [], and the closer α is to 1, the closer the smoothing value is to the data value of the current time, And the smoother the data, the closer α is to 0, the closer the smoothing value is to the smoothing value of the first I data. the smoother the data is, the α value can usually be tried several times to achieve the best effect.

The formula for prediction by an exponential smoothing algorithm is: xi + h = si, where I is the coordinate of the last data record, that is, the predicted time series is a straight line, does not reflect the trend and seasonality of time series.

Secondary Exponential SmoothingThe trend information is retained so that the predicted time series can contain the trend of the previous data. The secondary exponential smoothing shows the smoothing trend by adding a new variable t:

Si = α xi + (1-α) (Si-1 + ti-1)

Ti = half (si-si-1) + (1-gauge) ti-1

The prediction result of quadratic smoothing is a straight line.

The cubic exponential smoothing retains the seasonal information on the basis of the secondary exponential smoothing so that it can predict a seasonal time series. A new parameter P is added to show the smoothing trend.

There are two ways to accumulate and accumulate the three exponential smoothing. below is the three exponential smoothing method.

SI = α (Xi-pi-k) + (1-α) (Si-1 + ti-1)

Ti = half (si-si-1) + (1-gauge) ti-1

Pi = gamma (Xi-Si) + (1-gamma) Pi-k where k is the cycle

The formula for smoothing the accumulated cubic index is: XI + H = Si + HTI + pi-K + (H mod k). Note: The data charm p88 is incorrect here, which is corrected according to Wikipedia.

The following formula is the three exponential smoothing of multiplication:

SI = α XI/PI-K + (1-α) (Si-1 + ti-1)

Ti = half (si-si-1) + (1-gauge) ti-1

Pi = γ XI/Si + (1-γ) Pi-K, where k is the cycle

The formula for smoothing the triplicate index is: XI + H = (Si + HTI) Pi-K + (H mod k). Note: The data charm p88 is incorrect here, corrected according to Wikipedia.

The values of α, α, and γ are located between [0, 1] and can be tested several times to achieve the best effect.

S, t, p the initial value of the selection of the overall impact on the algorithm is not particularly large, the general value is s0 = x0, t0 = x1-x0, when the accumulation of p = 0, tired multiplication time p = 1.

We use datamarket's international airline passengers data to test the performance of the accumulate and tired multiplication cubic exponential smoothing algorithm. This data records the number of passengers on an international route each month:

To use the accumulated cubic exponent for smoothing prediction, red indicates the source time series, and blue indicates the predicted time series. The values of α, α, cosine, and γ are 0.45, 0.2, and 0.95:

For the effect of smoothing the triplicate index, the values of α, cosine, and γ are 0.4, 0.05, 0.9, and:

We can see that the cubic exponential smoothing algorithm can store the trend and seasonal information of time series data, and the tired multiplication smoothing algorithm is better in the International Airline Passengers dataset.

References:

[1]. Data charm: data analysis based on open-source tools

[2]. DataMarket: International Airline Passengers

[3]. Wikipedia: Exponential Smoothing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.