Benchmarked a regression-based demand forecast against a naive moving-average baseline across three top-volume product categories using two years of daily retail transaction data.
Note: Uses a synthetic Kaggle dataset (76,000 rows, daily granularity, Jan 2022–Jan 2024) for methodology demonstration.
Determine whether a lag/seasonality-based regression model meaningfully improves forecast accuracy over a simple moving-average baseline and identify where it does not.
- Source: Demand Forecasting Dataset, Kaggle
- 76,000 rows across Date, Category, Region, Store and demand-driver fields (Price, Discount, Promotion, Weather, Seasonality)
- Aggregated to daily category-level demand; top 3 categories by volume selected (Groceries, Clothing, Furniture)
- Split into train (all data except last 30 days) and test (final 30 days) per category
- Baseline: flat forecast using the trailing 7-day average from training data
- Model: linear regression using lagged demand (1-day, 7-day), 7-day rolling average and day-of-week as features
- Evaluated both using Mean Absolute Error (MAE) on the held-out test period
The regression model cut forecast error by ~60% for Groceries (MAE 1,041.6 → 421.3) and Furniture (MAE 476.5 → 188.4) confirming these categories follow predictable trend and weekly-cycle patterns.
Clothing showed no improvement (MAE 230.2 vs. 230.7); its demand isn't explained by recent history or weekly seasonality alone, pointing to pricing or promotional activity as the likely driver instead.
Deploy the regression approach for Groceries and Furniture demand planning. For Clothing, incorporate price and promotion variables before relying on a trend-based forecast.
Python (Pandas, scikit-learn, NumPy, Matplotlib), Google Colab
demand_forecasting_analysis.ipynb— full notebookforecast_results_summary.csv— MAE results by categoryforecast_vs_actual.png,mae_comparison.png— visuals

