🤔 What is "Exponential Smoothing"?
Explain it like I'm a CEO:
Exponential Smoothing Models are a type of forecasting technique that uses past data to estimate and predict future values. It’s used in economics, sales, marketing and other domains as a method of predicting upcoming demand or sales performance.
Why do I care about exponential smoothing models?
Exponential Smoothing Models can help business and organizations make predictions about the future, so they can plan production cycles and adjust their strategy accordingly. Knowing how to use these models can help a company save time and money by avoiding unnecessary production and having a better understanding of potential sales.
How can I apply exponential smoothing models?
Exponential Smoothing Models can be used for making predictions about things like stock prices, product demand, inventory levels and customer satisfaction. To get started with these models, you can first set up a simple periodic forecast model and then refine it as needed. You would also need to identify suitable parameters (trend, seasonality) and other factors that could influence the performance of the model.
🤓 For the Experts
Exponential smoothing is related to a moving average, but it differs in one significant way. In Moving Average (MA), the values of the data points are equally weighted, while in Exponential Smoothing (ES) the recent past values are given more weightage and the weights may be different for each data point according to an exponential function. Additionally, ES can incorporate seasonality into the model, allowing it to remain stable if there is a trend of repeated patterns. At its core Exponential Smoothing is a type of filtering technique used to produce a smoother version of the raw signal.
The main difference between exponential smoothing and moving averages is that moving averages have fixed weights whereas exponential smoothing assigns higher weights to more recent values. This can be useful when forecasting short-term trends, as recent values are more likely to reflect real-time events and shorter-term fluctuations.
The equation for exponential smoothing is:
Ft = α * Yt + (1 - α) * Ft-1
Where Ft is the current forecast value, Yt is the observation at time t, and α is the smoothing factor which lies in between 0 and 1.
Three principles to remember and master:
Smoothing: Smoothing essentially involves averaging out recent values, while suppressing the random noise present in the data. This gives us an overall trend with the noise exponentially fading away.
Prediction Interval: While making predictions, it's important to measure prediction uncertainty. Estimate a prediction interval (which a company needs to consider when making decisions) using 95% confidence.
Error Minimization: The goal should be to minimize errors produced by the forecast model. Errors in the forecast modeling process should be monitored regularly to ensure that the model is up-to-date and producing the most accurate predictions.
Resources to get you going:
Exponential Smoothing (Wikipedia)
A Gentle Introduction to Exponential Smoothing for Time Series Forecasting in Python
Exponential Smoothing vs. ARIMA
Exponential smoothing is an approach to forecasting that averages historical observations, giving more weight to more recent observations. This type of modeling is useful when there is no specific pattern or trend in the data, and when extrapolating small changes within a data set over time.
In contrast to exponential smoothing, ARIMA (AutoRegressive Integrated Moving Average) is a type of time series model. It uses a combination of autoregressive terms and moving average terms to describe the data. The model tries to predict future values based on past data points plus noise. ARIMA models are useful for forecasting any kind of time series data with patterns in them, such as demand or sales.
📖 A bit of history
Exponential Smoothing Models have been around for more than 60 years, invented by Charles C. Holt in 1957. He proposed a technique to forecast the near future of stock prices or company investment returns. Other notable figures in this field include Robert G. Brown and William S.Haggerty, who developed an approach called Double Exponential Smoothing.
🐼 Data Science all the Things
Here's some code to get you started with Exponential Smoothing Models:
Python
from statsmodels.tsa.api import SimpleExpSmoothing, Holt
import numpy as np
# Create a timeseries
timeseries = np.array([5,4,6, 8, 7, 3, 5, 4, 7, 10])
index = pd.date_range(start='1/1/2020', end='1/10/2020', freq='D')
df = pd.DataFrame(timeseries, index=index, columns=['y'])
# Check initial values
df.head()
# Fit Simple Exponential Smoothing
fit1 = SimpleExpSmoothing(df).fit(smoothing_level=0.2, optimized=False)
# Fit Holt's Method
fit2 = Holt(df).fit(smoothing_level=0.8,smoothing_slope=0.2, optimized=False)
R
library(forecast)
timeseries <- c(5,4,6, 8, 7, 3, 5, 4, 7, 10)
index <- seq(as.Date("2020-01-01"), by = "day", length.out = 10)
df <- ts(timeseries, start=c(2020,1), frequency=365)
# Fit Simple Exponential Smoothing
fit1 <- ets(df, model="ZZZ", damped=FALSE, lambda=NULL, biasadj=TRUE)
# Fit Holt's Method
fit2 <- holt(df, damped=TRUE, seasonal="add")
🧠 Drop your Knowledge
What's one thing you've learned about Exponential Smoothing Models in your experience? If you got this far, smash the ❤️ button. Drop your insights in the comments below 👇!