Intermittent Demand Models
Specialized models for sparse, lumpy demand patterns with many zeros.
| 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
Classic Croston method that 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 - bias-corrected Croston.
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 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 |
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;