Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double TripleExpSmooth(TVec *Y, TVec *S, TVec *B, TVec *L, double &Alpha, double &Beta, double &Gamma, const int Period); | Triple exponential smoothing. |
| 2 | void TripleExpSmooth(TVec *Y, TVec *S, TVec *B, TVec *L, const double Alpha, const double Beta, const double Gamma, double &MSE, const int Period); | In this case a fixed smoothing constants Alpha, Beta and Gamma are used in smoothing equations (no minimization is performed). |
Overload 1: double TripleExpSmooth(TVec *Y, TVec *S, TVec *B, TVec *L, double &Alpha, double &Beta, double &Gamma, const int Period);
Triple exponential smoothing.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Y | TVec * | Time series data set. |
| 2 | S | TVec * | Smoothed values (see above equation). Size and complex properties of S are set automatically. |
| 3 | B | TVec * | Trend values (see above equation). Size and complex properties of b are set automatically. |
| 4 | L | TVec * | Seasonal indices (see above equation). Size and complex properties of L are set automatically. |
| 5 | Alpha | double & | Defines initial estimate for Alpha, returns Alpha which minimizes MSE. |
| 6 | Beta | double & | Defines initial estimate for Beta, returns Beta which minimizes MSE. |
| 7 | Gamma | double & | Defines initial estimate for Gamma, returns Gamma which minimizes MSE. |
| 8 | Period | const int | Period length. An exception is raised if Y.Length mod Period is not 0. |
Returns: MSE, evaluated at minimum.
Performs triple exponential smoothing (also known as Holt-Winters smoothing) using the following equations:
where Y are the observations, S are the smoothed observations, b trend factors, L the seasonal indices and P is the period length. To initialize triple exponential smoothing method we need at least one complete season's data to determine initial estimates of the seasonal indices L0]..L[P-1]. Again, there are several ways to initialize L values. The algorithm uses approach, described at [www.itl.nist.gov/div898/handbook/pmc/section4/pmc435.htm page. For initial estimate for S and b, the following equations are being used:
Note
There are no S[0]..S[P-2] values; the smoothed series starts with the smoothed version of the Y[P] observation. Also note that the internal algorithm automatically accounts for this by resizing S,b vector to Y.Length-Period.
Overload 2: void TripleExpSmooth(TVec *Y, TVec *S, TVec *B, TVec *L, const double Alpha, const double Beta, const double Gamma, double &MSE, const int Period);
In this case a fixed smoothing constants Alpha, Beta and Gamma are used in smoothing equations (no minimization is performed).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Y | TVec * | Time series data set. |
| 2 | S | TVec * | Smoothed values (see above equation). Size and complex properties of S are set automatically. |
| 3 | B | TVec * | Trend values (see above equation). Size and complex properties of b are set automatically. |
| 4 | L | TVec * | Seasonal indices (see above equation). Size and complex properties of L are set automatically. |
| 5 | Alpha | const double | Defines initial estimate for Alpha, returns Alpha which minimizes MSE. |
| 6 | Beta | const double | Defines initial estimate for Beta, returns Beta which minimizes MSE. |
| 7 | Gamma | const double | Defines initial estimate for Gamma, returns Gamma which minimizes MSE. |
| 8 | MSE | double & | Returns MSE, evaluated for constant Alpha, Beta and Gamma. |
| 9 | Period | const int | Period length. An exception is raised if Y.Length mod Period is not 0. |