Exponential Smoothing
P7.forecasting.02 · Audience: guest, it-ml, language-pro · Prerequisites: Baselines You Must Beat
The baselines set the bar; now comes the first real forecasting method. The moving average from the last module treated its window bluntly — the value from five days ago counted exactly as much as yesterday's, and everything older counted for nothing. Exponential smoothing replaces that cliff with a slope: every past value gets a vote, but the votes fade the further back you look. One dial controls how fast they fade — and two upgrades of the same idea carry it all the way to trending, seasonal series.
Two extremes bracket the problem. Averaging all history gives a stiff forecast that barely moves when the series shifts — old data outvotes the news. The naive forecast is the other extreme: it listens only to yesterday and inherits every wiggle of the noise. What you want is in between — recent values should count most, older values should fade smoothly rather than fall off a cliff.
ⓘ Concept: Simple exponential smoothing (SES)
Why it matters — SES tracks a single quantity — the current level of the series — and updates it with each new observation. The smoothing parameter α (between 0 and 1) is the forgetting dial: α near 1 trusts the latest value and reacts fast like naive; α near 0 trusts the accumulated level and moves slowly like a long average. Weights on past values decay geometrically — exponentially — which gives the method its name.
🗣️ From a linguist's perspective: A conversation partner who forgets gracefully
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Try it yourself
A scratch console for this page's ideas — ungraded, nothing you run here is recorded.
Scratch console
A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.
Output appears here.
Where next?
Later in Forecasting
Go up a level