← All lessons
0196

Time Series Forecasting

Sales, traffic, temperatures, stock levels — data with a timestamp has structure ordinary models ignore. Classical forecasting decomposes a series into three parts: trend (the long climb or decline), seasonality (the repeating wave — daily, weekly, yearly), and residual noise. Forecasting means extending the predictable parts forward; the noise, by definition, cannot be predicted, only bounded. Classics like ARIMA and exponential smoothing formalise this, gradient-boosted trees dominate messy business data, and the key discipline is unique to time: validate by predicting the future from the past — never shuffle time-stamped data into random splits.

Toggle trend and seasonality in the forecast model and watch the dashed prediction against where the series is really heading. Miss either component and the error number shows exactly what ignoring structure costs.

avg forecast error: 0
observed (4 years)forecastTrend + seasonality captured: the forecast continues both the climb and the yearly wave.

Classical forecasting decomposes a series into trend, seasonality, and residual noise, then extends the predictable parts. Noise, by definition, cannot be forecast the goal is to model everything that is not noise.

Check yourself

Why is randomly shuffling time series data into train and test sets — standard practice everywhere else — a form of cheating here?

Go deeper (free): Forecasting: Principles & Practice (free book)

Next: Clustering