Principle Analysis of Holt-winters model

Source: Internet
Author: User

Holt-winters model principle Analysis and code implementation (Python) from:78051192 introduction

Recently, the laboratory teacher let me to predict the scenic area of the delivery of vehicles, so, the spirit of "wholeheartedly output the labor of the prime" this beginner's mind, I went to look for information on the fart, and then found the Holt-winters model, feel this model can have, so go to research, and summed it up into this blog.

Principle Analysis Moving average (the simple moving Average (SMA))

Intuitively, the simplest way to smooth a time series is to implement a moving average with no weight, and the currently known method is to use a window function, and the smoothing statistic St is the mean value of the most recent K observations. The formula is as follows:

There are obvious flaws in this method, when K is compared with the hour, the predicted data smoothing effect is not obvious, and it highlights the most recent changes of the data; when k is large, there is a good smoothing effect, but the predicted data is delayed. and a minimum of K values (limited window) is required.

Weighted moving Average

A slightly more complex approach is to first select a set of weighting factors to calculate the weighted moving average

These weights are then used to calculate these smoothing statistics:

In practice, when weighting factors are selected, the most recent data in the time series is given greater weight and the weight of the old data is reduced. This method also requires a minimum of k values and is computationally complex.

Simple Exponential Smoothing method

Fortunately there is a way to avoid the above problem, which is called exponential smoothing method. The simplest exponential smoothing method is as follows:

where α is the smoothing factor, 0 <α< 1. In other words, the smoothed statistical value ST is the weighted average of the current statistical value XT and the St-1 of the last-time smoothed value. This simple exponential smoothing is very easy to apply because it can be calculated as long as there are two observations. Here α selection, we can use the least squares to determine the α (minimization)

Why is it called the "exponential" smoothing method?

From its recursive formula can be found:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmdy2ntixng==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast)
The simple exponential smoothing method is suitable for time series with no general trend. If you are dealing with a sequence with a general trend, the smoothed values tend to lag behind the original data, unless the alpha value is close to 1, but this results in a lack of smoothing.

Two-time exponential smoothing

In order to solve the above problems, two exponential smoothing is introduced, which can keep the general trend information. Because the exponential smoothing is applied two times, it is called two exponential smoothing. Compared to simple exponential smoothing, two exponential smoothing is added to the time trend statistic BT, as follows:

To predict the M days after XT, the formula is as follows:

Three-time exponential smoothing

Three exponential smoothing also takes into account the seasonal characteristics of the time series.
Seasonality is defined as the trend of time series data, which shows that each cycle repeats its own behavior, just like any periodic function. The term "season" is used to denote that the behavior begins to repeat itself every time period L. In nature there are different types of seasonal "additive" (additive) and "multiplicative" (multiplicative), just like addition and multiplication are mathematical basic operations.
If every December sells more than 1000 apartments per November, we say that the seasonal trend is "additive". Can be expressed by absolute growth. If we sell 10% more apartments in the summer than in winter, then the seasonal trend is "multiplicative" in nature.
The multiplicative formula is as follows:

where α is the data smoothing factor, 0 <α< 1;β is the trend smoothing factor, 0 <β< 1;γ is the seasonal change smoothing factor 0 <γ< 1.
The formula for initializing trend estimation B0 is:

The additive formula is as follows:

For three exponential smoothing, we must initialize the value of a full "season" CI, but we can simply set it to full 1 (for multiplicative) or full 0 (for additive). It is only when the length of the sequence is shorter that we need to carefully consider the selection of the initial value.
The Holt-winters model we are talking about here is three times exponential smoothing. Wow, finally cut to the chase.
All exponential smoothing updates the results of the previous step and uses the new information contained in the current time step data. They are implemented by "mixing" new information and old information, and the weights of the associated new and old information are controlled by an adjustable mixing parameter. The differences between the various methods are the number of the quantities they track and the number of corresponding mixing parameters. Three times exponential smoothing method, the most powerful, both to reflect the trend and to reflect the seasonality, so three times the exponential smoothing of the parameters of the most, there are three.

Principle Analysis of Holt-winters model

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.