Exponential smoothing is a widely preferred statistical technique to forecast a time series. We use this simple yet powerful forecasting method for smoothing univariate time series data by using the exponential window function. 

What Is Exponential Smoothing?

Exponential smoothing is a time series method for forecasting univariate time series data. Time series methods work on the principle that a prediction is a weighted linear sum of past observations or lags. The Exponential Smoothing time series method works by assigning exponentially decreasing weights for past observations. It is called so because the weight assigned to each demand observation is exponentially decreased. 

Professional Certificate Program In Data Science

The Ultimate Ticket to Top Data Science Job RolesExplore Course
Professional Certificate Program In Data Science

The model assumes that the future will be somewhat the same as the recent past. The only pattern that Exponential Smoothing learns from demand history is its level - the average value around which the demand varies over time.     

Exponential smoothing is generally used to make forecasts of time-series data based on prior assumptions by the user, such as seasonality or systematic trends. 

Exponential Smoothing Forecasting

Exponential smoothing is a broadly accurate forecasting method for short-term forecasts. The technique assigns larger weights to more recent observations while assigning exponentially decreasing weights as the observations get increasingly distant. This method produces slightly unreliable long-term forecasts.

Exponential smoothing can be most effective when the time series parameters vary slowly over time. 

Types of Exponential Smoothing

The main types of Exponential Smoothing forecasting methods are:

1. Simple or Single Exponential Smoothing

Simple or single exponential smoothing (SES) is the method of time series forecasting used with univariate data with no trend and no seasonal pattern. It needs a single parameter called alpha (a), also known as the smoothing factor. Alpha controls the rate at which the influence of past observations decreases exponentially. The parameter is often set to a value between 0 and 1.   

The simple exponential smoothing formula is given by:

st = αxt+(1 – α)st-1= st-1+ α(xt – st-1)

here, 

st = smoothed statistic (simple weighted average of current observation xt)

st-1 = previous smoothed statistic

α = smoothing factor of data; 0 < α < 1

t = time period

2. Double Exponential Smoothing

This method is known as Holt's trend model or second-order exponential smoothing. Double exponential smoothing is used in time-series forecasting when the data has a linear trend but no seasonal pattern. The basic idea here is to introduce a term that can consider the possibility of the series exhibiting some trend. 

In addition to the alpha parameter, Double exponential smoothing needs another smoothing 

factor called beta (b), which controls the decay of the influence of change in trend. The method supports trends that change in additive ways (smoothing with linear trend) and trends that change in multiplicative ways (smoothing with exponential trend).  

The Double exponential smoothing formulas are:

S1 = x1

B1 = x1-x0

For t>1,

st = αxt + (1 – α)(st-1 + bt-1)

βt = β(st – st-1) + (1 – β)bt-1

here,

bt = best estimate of the trend at time t

β = trend smoothing factor; 0 < β <1

Professional Certificate Program in Data Science

The Ultimate Ticket To Top Data Science Job RolesExplore Course
Professional Certificate Program in Data Science

3. Triple Exponential Smoothing

This method is the variation of exponential smoothing that's most advanced and is used for time series forecasting when the data has linear trends and seasonal patterns. The technique applies exponential smoothing three times – level smoothing, trend smoothing, and seasonal smoothing. A new smoothing parameter called gamma (g) is added to control the influence of the seasonal component.  

The triple exponential smoothing method is called Holt-Winters Exponential Smoothing, named after its contributors, Charles Holt and Peter Winters.

Holt-Winters Exponential Smoothing has two categories depending on the nature of the seasonal component:

  • Holt-Winter's Additive Method − for seasonality that is addictive.
  • Holt-Winter's Multiplicative Method – for seasonality that is multiplicative. 

How to Configure Exponential Smoothing

To configure Exponential Smoothing, analysts need to specify all the model hyperparameters explicitly. However, this can be challenging for both beginners and experts. 

Instead, numerical optimization is commonly used to search for and fund the smoothing factors (alpha, beta, gamma, phi) for the model resulting in the most negligible error. 

An exponential smoothing method can obtain values for unknown parameters by estimating them from the observed data. The initial values and unknown parameters can be estimated by minimizing the sum of the squared errors (SSE). 

The parameters that indicate the kind of change in trend or seasonality (for example, whether they are additive or multiplicative or whether they should be dampened) need to be specified explicitly. 

Exponential Smoothing in Python

Let us look at how to implement exponential smoothing in Python. 

The Statsmodels Python library provides the implementations of Exponential Smoothing in Python. 

Single Exponential Smoothing 

The SimpleExpSmoothing Statsmodels class enables implementation of Single Exponential Smoothing or simple smoothing in Python. 

First, an instance of SimpleExpSmoothing is instantiated and passed the training data. Next, the fit() function is called, giving the fit configuration, especially the alpha value. The fit() function returns an instance of the HoltWintersResults class containing the learned coefficients. The forecast() or the predict() function is then called on the result object to make a forecast. 

Double and Triple Exponential Smoothing

The SimpleExpSmoothing Statsmodels class also enables the implementation of Double and Triple Exponential Smoothing in Python. 

First, an instance of SimpleExpSmoothing is instantiated, specifying training data and model configuration. We must define the configuration parameters for trend, damped, seasonal, and seasonal_periods. The fit() function is then called to fit the model on the training data. 

The fit() function returns an instance of the HoltWintersResults class containing the learned coefficients. The forecast() or the predict() function is then called on the result object to make a forecast.

Learn From The Best in The Data Science Business!

Caltech Data Science BootcampExplore Course
Learn From The Best in The Data Science Business!

FAQs

1. What are the three types of exponential smoothing?

The three types of exponential smoothing are: 

  • Simple or single exponential smoothing
  • Double exponential smoothing
  • Triple exponential smoothing

2. What is meant by exponential smoothing?

Exponential smoothing is a method for forecasting univariate time series data. It is based on the principle that a prediction is a weighted linear sum of past observations or lags. The Exponential Smoothing time series method works by assigning exponentially decreasing weights for past observations. The technique is so called because the weight assigned to each demand observation exponentially decreases. 

3. Why is exponential smoothing best?

Exponential smoothing gives accurate and reliable forecasts to predict the next period. Analysts can analyze the projected and actual demand shown in the estimates for effective demand planning. This helps maintain accurate inventory levels. 

Additionally, they can adjust exponential smoothing parameter values to change how quickly prior observations lose importance in calculations. This enables tweaking the relative significance of present observations to previous observations to meet the requirements of the subject area. 

4. How do you calculate exponential smoothing?

The simplest formula to calculate exponential smoothing is:

st = αxt+(1 – α)st-1= st-1+ α(xt – st-1)

here, 

st = smoothed statistic (simple weighted average of current observation xt)

st-1 = previous smoothed statistic

α = smoothing factor of data; 0 < α < 1

t = time period

5. What is the difference between moving average and exponential smoothing?

Moving Average and Exponential Smoothing are two important techniques used for time series forecasting. 

Moving Average is applied to data to filter random noise from it, while Exponential Smoothing applies exponential window function to data. 

Methods under the moving average smoothing process are focused on the values with their timings, while methods under exponential smoothing provide support against trend and seasonality components of time series. The exponential moving average is focused on current values.  

We weigh past observations equally in Moving Average, while Exponential Smoothing assigns exponentially decreasing weights to observations as they age. To put it simply, recent observations are given more weightage in forecasting compared to older observations.   

6. How is exponential smoothing used in forecasting?

Exponential smoothing is a widely preferred forecasting method for smoothing univariate time series data using the exponential window function. The method works by assigning exponentially decreasing weights for past observations. Larger weights are assigned to more recent observations, while exponentially decreasing weights are assigned as the observations get more and more distant. 

Exponential smoothing assumes that the future will be somewhat the same as the recent past and, therefore, provides forecasts of time-series data based on prior assumptions by the user, such as seasonality or systematic trends. We can use it most effectively to make short-term forecasts when the time series parameters vary slowly over time. 

Simplilearn's Professional Certificate Program in Data Science in partnership with Purdue University and in collaboration with IBM, is ranked #1 Post Graduate in Data Science program by ET. If you wish to ace data science, this program is just the one for you!

Final Words

In this tutorial, you learned the introduction to exponential smoothing for time series forecasting in Python, its types, and how to implement the method. To know more about time series forecasting, or to start a career in data science, consider our top-ranked Professional Certificate Program In Data Science – awarded the best data science boot camp.  

About the Author

SimplilearnSimplilearn

Simplilearn is one of the world’s leading providers of online training for Digital Marketing, Cloud Computing, Project Management, Data Science, IT, Software Development, and many other emerging technologies.

View More
  • Disclaimer
  • PMP, PMI, PMBOK, CAPM, PgMP, PfMP, ACP, PBA, RMP, SP, and OPM3 are registered marks of the Project Management Institute, Inc.
  • *According to Simplilearn survey conducted and subject to terms & conditions with Ernst & Young LLP (EY) as Process Advisors