Welcome to the Cisco Product Bookings Forecasting project, developed for the Cisco Global Supply Chain. This solution was created as part of the Cisco Forecasting League Hackathon, where it proudly secured 2nd Place!
This repository contains a robust, dynamic demand-forecasting pipeline that incorporates an advanced Softmax Ensemble engine, designed to forecast Cisco's quarterly product bookings effectively.
By applying smart time-series validation, preventing data leakage, and routing predictions based on explicit product characteristics, this pipeline achieves strong business results, shifting the forecasting culture from "Winner-Takes-All" to "Weighted Collaboration."
The new dynamic predictive pipeline drastically boosts model reliability and robustness compared to manual legacy forecasts.
Important
The automated pipeline drastically improves baseline metrics: Walk-forward cross-validation indicates a mean historical accuracy of 90.48% and eliminates systemic forecasting bias (near-perfect zero-centered bias of -0.69%).
- The "Demand Planner Anchor": Legacy demand planners accurately track established products but drift dramatically over time. By automatically routing stable products to a 70% Demand Planner / 30% ML split, our pipeline achieves near-perfect fidelity (e.g.
99.4%accuracy on the Switch Core 25G/100G Fiber). - Decline Phase Buffers: Hardware in decline (e.g. Router Enterprise Edge) can mimic a "dead cat bounce," confusing pure algorithmic models. Explicit pipeline guardrails cap automated forecasts at
1.05 × Last Quarter Actuals, resolving chronic overstocking. - NPI Ramp: Algorithmic models lack the historical context needed to predict fast ramp-ups on New Product Introductions (NPI). The pipeline detects this life cycle stage and defaults to aggressive team forecasts instead of using Tree-based ML.
- The "Black Swan" Buffer: Extreme market volatility and unpredictable macroscopic events can decouple leading indicators from reality. By intelligently indexing volatility and routing these unpredictable products explicitly to a dual-method blend (Demand Planner + ETS), the system provides a protective buffer against Black Swan forecasting catastrophes.
pie title Forecast Ensembles Example (Stable Product Protocol)
"Demand Planner Pipeline (Human Anchor)" : 70
"ML Aggregation (XGBoost/RF/LGBM)" : 30
The data pipeline aggregates raw bookings alongside "Big Deal" indicators, SCMS (Sales Channel Segment), and VMS (Industry Segment) telemetry to construct robust signals.
graph TD
subgraph Data & Preprocessing
A1[(Historical Bookings)] --> B(Feature Engineering)
A2[Big Deal Data\nShifted 1 Quarter] -.-> B
A3[SCMS / VMS HHI\nShifted 1 Quarter] -.-> B
end
subgraph Explicit Volatility/Lifecycle Routing
B --> C{Product Trajectory?}
C -- "High Volatility" --> D[Demand Planner + ETS Blend]
C -- "Decline Stage" --> E[Lag Multiplier Override\nCap Forecast 1.05x]
C -- "Softmax Pool" --> F(Machine Learning & Statistics)
end
subgraph Dynamic Softmax Validation
F --> G[XGBoost & LightGBM]
F --> H[RandomForest]
F --> I[Auto-ARIMA & ETS]
G --> K((Temperature-Scaled Softmax Engine))
H --> K
I --> K
end
subgraph Final Forecast Delivery
K --> L[Bias Cancellation Factor]
L --> Z((Final Prediction Value))
D --> Z
E --> Z
end
classDef stage fill:#2e3a59,stroke:#fff,stroke-width:2px,color:#fff;
class C,K,L,Z stage;
Guardrails against Leakage: To ensure that ML features do not unintentionally "cheat," all external concentration features (Big Deals, SCMS HHI, VMS HHI) are intentionally lagged by 1 quarter.
The accompanying eda_analysis.py script comprehensively visualizes key metrics across our ecosystem.
flowchart LR
A([EDA Entry Point]) --> B(Product Lifecycle Profiles)
A --> C(Seasonality Constraints)
A --> D(Big Deal & Volatility)
A --> E(Existing Forecast Baselines)
B -.->|Sustaining vs Decline| B2>Life Cycle Distribution Chart]
C -.->|Q1 vs Q3 Lags| C2>Quarterly Boxplots]
D -.->|Distribution Variance| D2>HHI Concentration Patterns]
E -.->|Legacy vs Pipeline Bias| E2>Forecast Bias Boxplots]
These EDA visualizations produce critical insights:
- Demand Volatility (Coefficient of Variation): Differentiates highly predictable and rhythmic sustaining equipment from sporadic infrastructure sales.
- Seasonality Detection: Generates quarter-in-year indices verifying cyclical IT acquisition budget behavior.
- Concentration Dependencies: Utilizing HHI (Herfindahl-Hirschman Index), the system proved that single-industry dependence structurally induces high overall prediction variance.
cisco/
├── data/ # Pre-aggregated source files
├── output/ # Generated outputs, test validations & EDA Plots
├── src/ # Core codebase architecture
│ ├── data_loader.py # Data ingestion protocol
│ ├── evaluate.py # Accuracy and Bias tracking functions
│ ├── feature_engineering.py # Trend, Seasonality, Concentration Metrics
│ ├── forecast.py # Advanced Execution & Backtesting
│ └── model.py # Implementations of Softmax XGBoost/LightGBM
├── business_insights.md # Comprehensive report on validation and insights
├── eda.ipynb # Sandbox analysis notebook
├── eda_analysis.py # Generates complete EDA graphic reports
├── forecasting_methodology.md # Detailed writeup on time-series prevention/routing
└── requirements.txt # Python dependencies
Ensure your Python environment uses requirements.txt.
Execute the forecasting pipeline:
python -m src.forecastGenerate EDA Plots:
python eda_analysis.py(All generated visual output will automatically route to the output/ directory)