Revenue by Category
Demand by Region
Monthly Revenue Trend
Demand Distribution by Band
Demand by Category (Avg Units/Day)
Promotion Impact on Demand
Demand Volatility by Category
Weekend vs Weekday Demand
Category Demand Summary
| Category | Avg Demand | Revenue | Promo Lift | Volatility | Stockout Risk |
| Groceries | 25.4 | $8.2M | +52% | Low | Low |
| Dairy | 22.1 | $6.8M | +48% | Low | Medium |
| Beverages | 18.3 | $5.9M | +55% | Medium | Low |
| Snacks | 15.0 | $5.1M | +60% | Medium | Low |
| Frozen | 12.2 | $4.3M | +45% | Medium | Medium |
| Personal Care | 8.5 | $3.8M | +38% | Low | Low |
| Household | 7.1 | $3.4M | +42% | Low | Low |
| Electronics | 4.2 | $4.1M | +35% | High | High |
| Clothing | 3.1 | $3.6M | +30% | High | Medium |
| Toys | 2.8 | $3.0M | +70% | High | High |
Model Comparison
| Model | Type | MAE | RMSE | R² | MAPE | Train Time |
| LSTM | Keras Sequential | 2.84 | 4.12 | 0.918 | 12.4% | 45s |
| BiGRU | Keras Bidirectional | 2.71 | 3.98 | 0.924 | 11.8% | 52s |
| CNN-LSTM | Keras Hybrid | 2.58 | 3.76 | 0.933 | 11.1% | 48s |
| Attention | Keras Functional | 2.65 | 3.85 | 0.928 | 11.5% | 55s |
| XGBoost | Gradient Boosting | 3.02 | 4.35 | 0.908 | 13.1% | 8s |
| LightGBM | Gradient Boosting | 2.95 | 4.28 | 0.912 | 12.8% | 5s |
Best Model: CNN-LSTM (R² = 0.933, MAPE = 11.1%) — The CNN layer extracts local demand patterns
while LSTM captures sequential trends. All models tracked via MLflow for experiment reproducibility.
R² Score Comparison
MAE Comparison
Feature Importance (XGBoost)
Algorithm Benchmarks
Key DSA Results: Binary search reorder = 2.1x faster |
LRU cache = 50-100x speedup | Top-K heap = 3-5x faster |
Prefix sum queries = 1000x+ vs naive scan
DP Inventory Allocation by Store
Top-10 Stockout Risk Products
DSA Algorithm Performance Summary
| Operation | Naive Approach | Optimized (DSA) | Complexity | Speedup |
| Reorder Point Search | O(n log n) sort each time | O(log n) binary search | Pre-sorted array | 2-8x |
| Forecast Caching | Recompute every time | O(1) LRU cache | OrderedDict | 50-100x |
| Inventory Allocation | Greedy heuristic | O(nW) dynamic programming | Bounded knapsack | Optimal |
| Demand Anomaly | Recompute window each step | O(n) sliding window | Single pass | n/w x |
| Top-K Stockout | O(n log n) full sort | O(n log k) min-heap | Priority queue | 3-5x |
| Range Demand Query | O(n) sum each time | O(1) prefix sum | Pre-computed | 1000x+ |
| Bundle Detection | O(n²) brute force | O(n log n) two-pointer | Sorted + scan | 10-50x |