Introduction

In time series forecasting, there are two popular methods for triple exponential smoothing: TEMA (Triple Exponential Moving Average) and Holt-Winters method. Both methods are used to smooth out general trends along with seasonality factor in the data and improve prediction accuracy. However, there are some key differences between the two methods. TEMA uses three stage weighted averages of average to smooth the data whereas Holt-Winters uses a method that takes into account both trend and seasonality.

Holt-winters Triple Exponential Smoothing

Holt Winters method extends the concept of double exponential smoothing to account for both a Trend, Level and seasonality of the data. It employs three smoothing factors, one for the level (α – alpha) , one for the trend (β – beta) and one for seasonality (Ɣ -gamma)

Holt-Winters Triple exponential smoothing Formula:

  • Level (Lt)

          Lt = α * (Yt – St-m) + (1 – α) * (Lt-1 + Tt-1)

  • Trend (Tt):

           Tt = β * (Lt – Lt-1) + (1 – β) * Tt-1

  • Seasonality (St):

          St = Ɣ * (Yt – Lt) + (1 – Ɣ) * St-m

  • Forecasting:

          Forecast for time t + h (Ft+h) = (Lt +  Tt )* St-m

  • Notes

 h : number of time steps into the future to forecast.

 α , β , Ɣ : smoothing parameters

 Yt : actual data point at time t

 St-m : seasonal index at time t-m

 Tt-1  :  trend at time t-1

Example Holt-winters Double Exponential Smoothing

Date

Sales

Level

Trend

Season

Forecast

Jan196992.141.31
Feb185055.301.23
Mar193550.111.29
Apr26434.740.18
May172660.55131917.99105483.251.31
June102883.79237401.24105483.251.23421589.29
Jul49318.84342884.49105483.251.29576591.17
Aug92559.94448367.74105483.250.1897276.57
Sept112078.25553850.98105483.251.31862968.06
Oct117342.13659334.23105483.251.23940371.66
Nov145550.32764817.48105483.251.291119187.82
Dec80724.65870300.73105483.250.18171383.50
Jan150454.75975783.98105483.251.311415214.07
Where alpha = 0.4 , beta = 0.3 and gamma = 0.2

Triple Exponential Moving Average

Triple Exponential Moving Average (TEMA) extends the standard Single Exponential Smoothing by applying the Exponential Moving Average (EMA) values thrice. Three levels of EMA applied on the data set provides better smoothened and accurate forecasts.

TEMA Formula

  • TEMA = 3 * EMA(α, price) – 3 * EMA(β, EMA(α, price)) + EMA(Ɣ,EMA(β, EMA(α, price)))
  • St=α*yt+(1−α)*St−1

TEMA Example

Month

DATA POINTS

EMA

EMA(β,DP)

EMA(Ɣ,(β,DP))

TEMA

Jan9.759.759.759.759.75
Feb10.099.929.8529.821410.0254
Mar10.2710.1810.07610.008810.3208
Apr8.989.6259.8479.91579.2497
May8.798.8859.1819.38088.4928
June8.238.518.668.81638.3663
Jul8.248.2358.3458.43958.1095
Aug8.978.6058.4578.42348.8674
Sept9.0398.8428.72659.2005
Oct9.319.179.1029.0249.228
Nov10.259.789.5369.405810.1378

Dataset Information

The sample dataset from the Industry schema is as follows, with a focus on the “salesorderheader” relation.

Field

Type

Candidate Variable

OrderIDCharacter
CustomerIDInteger
ShipDateTimestamp
SalespersonemployeeIDInteger
ShipMethodIDInteger
TerritoryIDInteger
SubTotalNumeric

Number of records : 1561

Candidate keys

Number of unique values

Max Value

Min Value

Subtotal623129,261.2542.29
ShipDate6752014-05-012011-06-01

Workflow

Reading & Manipulating Data

  • The data is read via DB connector node and fed into KNIME via DB reader after choosing appropriate relation and extracting the necessary primary candidate key.
  • SubTotal (i.e. measure) values are grouped by applying an aggregate function (SUM), and this grouping is based on month and year.

Forecasting

  • Execute the Triple exponential smoothing methodology on the data present in the “SubTotal” column using a standard node called “moving average”.
  • Window size determines alpha values for the TEMA method, which is KNIME standard.
    • α = 2/(k+1) ,  k is the window size
  • Alternatively, the entire calculation for Holt-Winter method is be performed by executing a database procedure using the node “DB Query Executer”
  • Based on the degree of volatility of the data, different α, β, Ɣ values provide smoother forecasts that align with past patterns.
  • Numeric Scorer node is used to calculate the root mean square error (RMSE) value to find the average error between the predicted and actual values.

Visualization

Forecast Accuracy

Following table compares the standard Root Mean Squared Error value for the two methods Holt-Winter and TEMA.

Summary

  • Holt-Winters is particularly well-suited for data with clear trend and seasonality, as it captures these components effectively.
  • TEMA, on the other hand, is valuable for data with irregular patterns or when seasonality and trend are less pronounced.
  • A lower RMSE indicates better accuracy and closer alignment between the forecasted values and the actual data
  • The RMSE value of Holt-winter method is very high compared to the TEMA method
  • The trend doesn’t have explicit seasonality that couldn’t be captured by the Holt-Winter method

Authors

  • VedhashreeU
  • Kaptain