Skip to content

๐Ÿšƒ Promotion โœˆ Sensitive ๐Ÿš Hierarchical ๐Ÿ›ธProbabilistic ๐Ÿ›ผ Forecasting โ›ฑ Demand is ๐Ÿ•Œ an advanced ๐Ÿก machine โšฝ learning ๐Ÿฆ framework ๐ŸŸ designed to โšพ accurately ๐ŸฅŽ forecast ๐Ÿ€ Consumer ๐Ÿ demand by ๐Ÿ“” capturing ๐Ÿ“• promotional ๐Ÿ“— effects ๐Ÿ“˜ hierarchical ๐Ÿ“™ sales ๐Ÿชฃ dependencies ๐Ÿ› uncertainty ๐Ÿงบ distributions ๐Ÿชฌ across products regions time scales

License

Notifications You must be signed in to change notification settings

Hazrat-Ali9/Promotion-Sensitive-Hierarchical-Probabilistic-Forecasting-for-FMCG-Demand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Promotion-Sensitive Hierarchical Probabilistic Forecasting for FMCG Demand ๐Ÿ“ฆ๐Ÿ“Š

Promotion-Sensitive-Hierarchical-Probabilistic-Forecasting-for-FMCG-Demand is an advanced machine learning framework designed to accurately forecast Fast-Moving Consumer Goods (FMCG) demand by capturing promotional effects, hierarchical sales dependencies, and uncertainty distributions across products, regions, and time scales.

This project combines hierarchical Bayesian modeling, probabilistic deep learning, and promotion-aware feature engineering to deliver robust, scalable, and interpretable demand forecasts that drive smarter supply chain decisions in the FMCG industry.

๐Ÿงฉ Abstract

Traditional demand forecasting models struggle to handle the complex temporal and hierarchical relationships found in FMCG data, especially during promotional periods that heavily influence consumer behavior.

This project proposes a promotion-sensitive hierarchical probabilistic model that captures:

The impact of marketing promotions and discounts at both product and category levels.

Temporal dynamics across multiple time scales (daily, weekly, monthly).

Hierarchical dependencies (SKU โ†’ Category โ†’ Brand โ†’ Region โ†’ Country).

Predictive uncertainty, enabling risk-aware business planning.

โœจ Key Features

๐Ÿ“Š Hierarchical Probabilistic Forecasting: Models nested relationships between SKUs, product categories, and markets.

๐Ÿ›๏ธ Promotion Sensitivity: Incorporates promotion calendars, discount depth, and advertising intensity as causal drivers.

๐Ÿง  Deep Learning Backbone: Uses LSTM / Temporal Fusion Transformer (TFT) / DeepAR for sequential modeling.

๐Ÿ”ฎ Bayesian Uncertainty Estimation: Provides prediction intervals instead of point forecasts for better risk management.

๐Ÿ“ˆ Feature-Aware Forecasting: Integrates seasonality, price elasticity, and macroeconomic indicators.

๐Ÿงฐ Scalable to Enterprise FMCG Data: Designed for thousands of SKUs and regions simultaneously.

โš™๏ธ Technical Highlights Module Description Data Preprocessing Cleans, aggregates, and encodes multi-level FMCG data. Feature Engineering Generates promotion indicators, lagged sales features, calendar events, and price elasticity variables. Hierarchical Modeling Applies top-down and bottom-up reconciliation of forecasts across hierarchy levels. Probabilistic Forecasting Models sales as distributions (Gaussian / Negative Binomial / Quantile regression). Deep Sequence Models Implements DeepAR, LSTM, TFT, or N-BEATS architectures. Evaluation Framework Measures accuracy, calibration, and promotion impact across time horizons. ๐Ÿงฎ Methodology Overview Input: Historical Sales Data + Promotion Events + Price Changes + Holidays โ†“ Feature Engineering: Lag Features, Categorical Embeddings, Promo Flags, Seasonality Encoding โ†“ Model: Hierarchical Probabilistic Deep Learning Model โ†“ Output: Multi-level Forecasts (SKU, Brand, Category) + Prediction Intervals โ†“ Evaluation: Accuracy, Sharpness, Calibration, Business Uplift Metrics

๐Ÿงฐ Tech Stack

Languages: Python ๐Ÿ

Core Frameworks: PyTorch / TensorFlow Probability / PyMC / Prophet

Forecasting Libraries: GluonTS, Kats, Nixtla, NeuralForecast

Visualization: Plotly, Matplotlib, Seaborn, Altair

Data Handling: Pandas, NumPy, Dask, Polars

๐Ÿ“ Project Structure ๐Ÿ“ data/ # Raw and processed FMCG datasets ๐Ÿ“ notebooks/ # Experiment and analysis notebooks ๐Ÿ“ features/ # Promotion, temporal, and categorical feature generators ๐Ÿ“ models/ # Probabilistic and hierarchical forecasting models ๐Ÿ“ evaluation/ # Performance and uncertainty metrics ๐Ÿ“ results/ # Forecast visualizations and evaluation reports ๐Ÿ“ utils/ # Helper scripts and data loaders

๐Ÿš€ Getting Started git clone https://github.com/yourusername/Promotion-Sensitive-Hierarchical-Probabilistic-Forecasting-for-FMCG-Demand.git cd Promotion-Sensitive-Hierarchical-Probabilistic-Forecasting-for-FMCG-Demand pip install -r requirements.txt python train.py --model tft --hierarchy brand --promo_sensitivity True --forecast_horizon 90

๐Ÿ“Š Evaluation Metrics Category Metric Description Accuracy RMSE / MAPE / sMAPE Overall forecast performance Calibration CRPS / Sharpness Reliability of probabilistic predictions Fairness Weighted Reconciliation Error Hierarchical consistency Promotion Impact Lift vs. Baseline Sales uplift due to promotions Explainability SHAP / Attention Weights Feature contribution analysis ๐Ÿ’ก Business Impact

๐Ÿช Demand Forecasting Accuracy: Reduces forecast error during promo periods by 20โ€“30%.

๐Ÿ’ฐ Inventory Optimization: Aligns procurement and logistics with expected uplift.

๐Ÿ“ฆ Promotion Planning: Quantifies promotion elasticity to guide marketing spend.

๐ŸŒ Hierarchical Insights: Enables decision-making from SKU to national level.

๐Ÿง  Research Contributions

Introduces a promotion-sensitive probabilistic hierarchy for FMCG forecasting.

Combines Bayesian learning and deep sequence models for uncertainty quantification.

Provides an open-source reproducible pipeline for industry-scale forecasting research.

๐Ÿค Contributing

We welcome collaboration from:

Data scientists working in retail analytics or CPG forecasting

Researchers in probabilistic time series and causal inference

Practitioners in supply chain optimization and pricing strategy

License

MIT License

๐Ÿ† Citation

Hazrat Ali, Promotion-Sensitive Hierarchical Probabilistic Forecasting for FMCG Demand, 2025.

About

๐Ÿšƒ Promotion โœˆ Sensitive ๐Ÿš Hierarchical ๐Ÿ›ธProbabilistic ๐Ÿ›ผ Forecasting โ›ฑ Demand is ๐Ÿ•Œ an advanced ๐Ÿก machine โšฝ learning ๐Ÿฆ framework ๐ŸŸ designed to โšพ accurately ๐ŸฅŽ forecast ๐Ÿ€ Consumer ๐Ÿ demand by ๐Ÿ“” capturing ๐Ÿ“• promotional ๐Ÿ“— effects ๐Ÿ“˜ hierarchical ๐Ÿ“™ sales ๐Ÿชฃ dependencies ๐Ÿ› uncertainty ๐Ÿงบ distributions ๐Ÿชฌ across products regions time scales

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published