homeprojectsblogcredentialsusesaboutcontact
projects/time-series-forecasting
PythonFlaskRandom ForestPower BITime Series

Time Series Demand Forecasting

Industry-grade monthly demand forecasting pipeline across states, districts, and service types with Power BI dashboard integration.

Live demo ↗GitHub ↗
R² = 0.892MAE: 1842RMSE: 5623
Live Repository Metrics:
2 stars0 forks👁 2 watchers
Model R² Score
89.2%
Error Reduction
34%
Feature Coverage
95%
Jupyter Notebook91.1%HTML3.2%CSS2.5%JavaScript2.0%Python1.1%Dockerfile0.1%
1,842Mean Absolute Errordown from 2,790
5,623Root MSEstable variance
ExpandingCV Fold Typeleakage-free walk forward
3-tierGranularitystate, district, service

UIDAI services face fluctuating demand across geographies and service categories. Naive forecasting methods (moving averages) don't capture seasonal patterns or group-level heterogeneity, leading to resource misallocation.

Built a leakage-free ML pipeline using time-series cross-validation with an expanding-window strategy - no future data leaks into training folds. Engineered lag features (1, 3, 6, 12 months) and group-level scaling for each state-district-service combination. Used Random Forest as the base model for its interpretability and robustness.

PythonScikit-LearnPandasFlaskPower BIMatplotlibRender
  • R² of 0.892 on held-out test window (leakage-free)
  • MAE reduced to 1842.35 and RMSE to 5623.47 through lag feature engineering and group-level scaling
  • Flask web app with real-time prediction endpoint
  • Power BI dashboard for stakeholder-facing visualization
  • 01Expanding-window CV is essential for time series - standard k-fold introduces leakage that inflates metrics substantially
  • 02Group-level normalization before lag feature creation matters more than model complexity for heterogeneous demand data
  • 03Power BI's DirectQuery mode works better than import mode for data that updates frequently
← Back to projects