Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double DoubleExpSmooth(TVec *Y, TVec *S, TVec *B, double &Alpha, double &Gamma, const int InitMethod = 0); | Double exponential smoothing. |
| 2 | void DoubleExpSmooth(TVec *Y, TVec *S, TVec *B, const double Alpha, const double Gamma, double &MSE, const int InitMethod = 0); | In this case a fixed smoothing constants Alpha, Gamma are used in smoothing equations (no minimization is performed). |
Overload 1: double DoubleExpSmooth(TVec *Y, TVec *S, TVec *B, double &Alpha, double &Gamma, const int InitMethod = 0);
Double 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 | Alpha | double & | Defines initial estimate for Alpha, returns Alpha which minimizes MSE. |
| 5 | Gamma | double & | Defines initial estimate for Gamma, returns Gamma which minimizes MSE. |
| 6 | InitMethod = 0 | const int | Defines how the initial values for b[0] are calculated. |
Returns: MSE,evaluated at minimum.
Performs double exponential smoothing using the following equations:
Smoothing scheme begins by setting S[0] to Y[0] and b[0] to pne of the following choices:
Different initialization methods are controlled by the InitMethod parameter. Default value (0) uses first equation, setting it to (1) means the second equation will be used and setting it to (2) means the third equation will be used to initialize b[0].
The first smoothing equation adjusts S[i] directly for the trend of the previous period, b[i-1], by adding it to the last smoothed value, S[i-1]. This helps to eliminate the lag and brings S[i] to the appropriate base of the current value. The second smoothing equation then updates the trend, which is expressed as the difference between the last two values. The equation is similar to the basic form of single smoothing, but here applied to the updating of the trend.
Overload 2: void DoubleExpSmooth(TVec *Y, TVec *S, TVec *B, const double Alpha, const double Gamma, double &MSE, const int InitMethod = 0);
In this case a fixed smoothing constants Alpha, 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 | Alpha | const double | Defines initial estimate for Alpha, returns Alpha which minimizes MSE. |
| 5 | Gamma | const double | Defines initial estimate for Gamma, returns Gamma which minimizes MSE. |
| 6 | MSE | double & | Returns MSE, evaluated for constant Alpha and Gamma. |
| 7 | InitMethod = 0 | const int | Defines how the initial values for b[0] are calculated. |