When demand is intermittent, one of the most useful forecasts you can produce is not “how much will we sell”, but “how likely are we to sell anything at all”. And this probability can be modelled, just like demand itself.
This idea goes back to Croston, who suggested splitting intermittent demand into demand occurrence and demand sizes. The main image in the post shows a typical intermittent demand series, and the one below shows its occurrence part: “1” when someone bought the product, and “0” otherwise.

We now have a series that can be modelled on its own, and there are many ways to do that, which come down to your preferences and experience: ETS, ARIMA, logistic regression, GBM, Neural Network – you name it!
One thing to avoid, though, is trying to predict the exact periods when sales will happen: when demand is truly intermittent, you can’t. What you can forecast is the probability. I had a post on that topic.
In the smooth package, there is a separate function for this, OM, which allows using ETS, ARIMA and regression elements to model demand occurrence. It supports several types of occurrence, including the odds-ratio, the inverse-odds-ratio (related to Croston’s method) and the direct one (similar to TSB). But the simplest of all is the fixed probability, which assumes that the probability of sale does not change over time. It simply takes the share of periods with sales: if the product sold in 30 out of 100 weeks, the probability is 0.3. If you read my previous post, you might notice that this is essentially 1/ADI turned into a forecast, with the same limitation of ignoring how demand evolves. Still, it is a good benchmark and a starting point for intermittent demand forecasting.
In Python, this is done like this:
from smooth import OM, ADAM model = OM(occurrence="fixed") model.fit(y) fc = model.predict(h=10)
The resulting probability forecast is shown in the following image:

We can also use this directly in ADAM, which splits the demand into two parts on its own. Here is the model with ETS(M,N,N) for demand sizes and the fixed probability of occurrence, iETS(M,N,N)_F:
model = ADAM(model="MNN", occurrence="fixed") model.fit(y) model.predict(h=10)
The last command takes the probability from the occurrence model and multiplies it by the forecast of demand sizes. The result is the mean demand per period, just like from any other forecasting method.
Next time, I’ll tell you about the more advanced occurrence models, where the probability changes over time. So, stay tuned!
Try smooth for Python: pip install smooth
Occurrence model on wiki.