Forecasting Intermittent Time Series in Python | by Marco Peixeiro | Aug, 2023


A complete guide on intermittent time series forecasting in Python with a capstone project

Photo by Wexor Tmg on Unsplash

Intermittent time series, or sparse time series, is a special case where non-zero values appear sporadically in time, while the rest of the values are 0.

A common example of spare time series is rainfall over time. There can be a lot of consecutive days without rain, and when it rains, the volume varies.

Another real-life example of intermittent series is in the demand of slow-moving or high-value items, such as spare parts in aerospace or heavy machinery.

The intermittent nature of some time series pose a real challenge in forecasting, as traditional model do not handle intermittency well. Therefore, we must turn to alternate forecasting methods tailored for sparse time series.

In this article, we explore different ways of forecasting intermittent time series. As always, we explore each model theoretically first, and implement them in Python.

As always, the full source code is available on GitHub.

Learn the latest time series analysis techniques with my free time series cheat sheet in Python! Get the implementation of statistical and deep learning techniques, all in Python and TensorFlow!

Let’s get started!

Croston’s method is one of the most common approaches to forecasting spare time series. It often acts as a baseline model to evaluate more complex methods.

With Croston’s method, two series are constructed from the original series:

  • A series containing the time periods with only zero values
  • A series containing time periods with non-zero values

Let’s consider a toy example to illustrate that. Given the spare time series below:

Then, according to Croston’s method, we create two new series: one with non-zero values, and the other with the period of time separating non-zero values.



Source link

Leave a Comment