Member-only story
Time series residuals: gold in them thar hills
How model leftovers provide more insight than you might think
Practitioners oftentimes get lost in assessing how well a model fits a data set. Most of the time this involves perusing multiple loss metrics — sometimes segmented — or sifting through endless charts of actual versus expected performance in order to identify model weaknesses or biases.
There’s nothing wrong with this and it is a crucial part of the modelling process. However, it’s important not to overlook the natural dual of model fit: the model residual.
We can think of the model residual as a model “leftover”. In theory, the residual from a good model is just random noise as a “good” model has captured all of the true signal. In practice, this is not always the case and the residual can provide insight to drive model improvement. In a broad sense, popular gradient-boosted tree models like XGBoost and LightGBM do just this — exploit residuals to build better models.
Today we’ll take a look at how time series residuals can help us build better forecasting models.
- We’ll start with some real-world data, taking a quick look at road traffic accidents in the UK.
- A little coding will gives us functionality to build and examine a time series…