Intermittent Demand Models
AnoFox provides 6 intermittent demand models: 3 Croston variants (Classic, Optimized, SBA with bias correction), ADIDA for very sparse demand, IMAPA for complex multi-temporal intermittency, and TSB for trending sparse patterns. These models are designed for data with high zero percentages -- spare parts inventory, low-volume SKUs, and irregular service demand -- where standard ETS or ARIMA models produce unreliable forecasts. CrostonSBA is the recommended default for most intermittent demand scenarios due to its bias correction.
Intermittent demand refers to demand patterns characterized by frequent zero-demand periods interspersed with irregular, often variable-sized orders. These specialized models handle sparse, lumpy demand patterns that standard forecasting methods like ETS or ARIMA struggle with.
| Model | Description |
|---|---|
CrostonClassic | Classic Croston method for sparse demand |
CrostonOptimized | Croston with optimized smoothing parameters |
CrostonSBA | Syntetos-Boylan Approximation (bias-corrected) |
ADIDA | Aggregate-Disaggregate Intermittent Demand |
IMAPA | Intermittent Multiple Aggregation Prediction |
TSB | Teunter-Syntetos-Babai (trending intermittent) |
CrostonClassic
The Croston method is a forecasting approach designed for intermittent demand that decomposes the problem into two components: the size of non-zero demands and the interval between consecutive non-zero demands. Each component is forecast separately using exponential smoothing, and the final demand rate is their ratio. This classic variant separately forecasts demand size and inter-arrival times.
Example
SELECT * FROM ts_forecast_by(
'spare_parts', NULL, date, demand,
'CrostonClassic', 30, '1d',
MAP{}
);
Best for: Sparse demand, many zeros, spare parts inventory.
CrostonOptimized
Croston method with optimized smoothing parameters.
Example
SELECT * FROM ts_forecast_by(
'spare_parts', NULL, date, demand,
'CrostonOptimized', 30, '1d',
MAP{}
);
Best for: Better variance estimation than classic Croston.
CrostonSBA
Syntetos-Boylan Approximation (SBA) - a bias-corrected variant of Croston's method.
Example
SELECT * FROM ts_forecast_by(
'low_frequency', NULL, date, demand,
'CrostonSBA', 30, '1d',
MAP{}
);
Best for: Reduced bias, low-frequency demand.
ADIDA
Aggregate-Disaggregate Intermittent Demand Approach.
Example
SELECT * FROM ts_forecast_by(
'very_sparse', NULL, date, demand,
'ADIDA', 30, '1d',
MAP{}
);
Best for: Very sparse demand, complex intermittent patterns.
IMAPA
Intermittent Multiple Aggregation Prediction Algorithm.
Example
SELECT * FROM ts_forecast_by(
'complex_intermittent', NULL, date, demand,
'IMAPA', 30, '1d',
MAP{}
);
Best for: Very complex intermittency, multiple temporal patterns.
TSB
Teunter-Syntetos-Babai (TSB) method - handles trending intermittent demand.
Example
SELECT * FROM ts_forecast_by(
'trending_sparse', NULL, date, demand,
'TSB', 30, '1d',
MAP{}
);
Best for: Intermittent + trending, growing/declining sparse demand.
Comparison
| Model | Trend Support | Bias Correction | Complexity |
|---|---|---|---|
| CrostonClassic | No | No | Simple |
| CrostonOptimized | No | No | Simple |
| CrostonSBA | No | Yes | Simple |
| ADIDA | No | Moderate | Medium |
| IMAPA | No | Yes | Complex |
| TSB | Yes | Yes | Medium |
Demand Classification
Before choosing a model, classify your demand pattern:
| Pattern | Zero % | Variation | Recommended |
|---|---|---|---|
| Smooth | Low | Low | AutoETS |
| Erratic | Low | High | MFLES |
| Intermittent | High | Low | CrostonSBA |
| Lumpy | High | High | TSB or ADIDA |
When to Use Intermittent Models
| Scenario | Recommended Model |
|---|---|
| Spare parts inventory | CrostonClassic |
| Low-frequency demand | CrostonSBA |
| Very sparse (>80% zeros) | ADIDA |
| Complex intermittency | IMAPA |
| Growing/declining sparse | TSB |
| Quick baseline | CrostonClassic |
The demand classification approach is critical for intermittent series: use the zero percentage as a primary selector. Below 30% zeros, standard models like AutoETS or MFLES perform well. Between 30-70% zeros, CrostonClassic or CrostonSBA are appropriate. Above 70% zeros, ADIDA or IMAPA handle the extreme sparsity. TSB is the only intermittent model that handles trending demand, making it essential for products with growing or declining order patterns.
Example: Spare Parts Forecasting
-- Classify demand first
WITH classified AS (
SELECT
sku_id,
COUNT(*) as n_obs,
SUM(CASE WHEN demand = 0 THEN 1 ELSE 0 END)::DOUBLE / COUNT(*) as zero_pct
FROM spare_parts_demand
GROUP BY sku_id
)
-- Use appropriate model based on zero percentage
SELECT
sku_id,
CASE
WHEN zero_pct > 0.7 THEN 'CrostonSBA'
WHEN zero_pct > 0.3 THEN 'CrostonClassic'
ELSE 'AutoETS'
END as recommended_model
FROM classified;
Frequently Asked Questions
How do I know if my demand is "intermittent" enough for these models?
If more than 30% of your observations are zero, consider intermittent demand models. Classify your demand using the ADI (Average Demand Interval) and CV (Coefficient of Variation) metrics. High ADI with low CV indicates intermittent demand (use CrostonSBA). High ADI with high CV indicates lumpy demand (use TSB or ADIDA). The Demand Classification table above provides thresholds.
Why does Croston tend to overestimate demand?
Classic Croston has a known positive bias because it estimates demand size and interval independently, then divides them. The ratio of two separately smoothed estimates introduces systematic upward bias. CrostonSBA (Syntetos-Boylan Approximation) applies a correction factor to remove this bias, making it the preferred default for most intermittent demand scenarios.
Can I use these models with grouped data (e.g., per SKU)?
Yes. All intermittent models work with ts_forecast_by which supports the group_col parameter. Pass your SKU or product column as the group column and the function fits a separate model for each group automatically. Use NULL for the group column if you have a single series.
When should I use TSB instead of Croston variants?
Use TSB (Teunter-Syntetos-Babai) when your intermittent demand has a trend -- either growing or declining over time. Croston and its variants assume a stationary demand rate, so they cannot capture systematic changes. TSB explicitly models the demand probability as time-varying, making it the only intermittent model in this set that handles trending sparse demand.