Skip to content

sandeepkumar9760/-Retail-demand-forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 Retail Demand Forecasting

Author: Sandeep Kumar · B.Tech CSE · Lovely Professional University


Problem Statement

Retail chains lose significant revenue through overstock (wastage) and stockouts (missed sales). This project builds a production-ready demand forecasting pipeline for 1,115 Rossmann stores using Meta's Prophet model, delivering ~18% reduction in overstock vs a naive lag-7 baseline.


Key Results

Metric Value
Model Prophet (multiplicative seasonality)
MAPE (Walk-Forward CV) ~8.2%
Overstock Reduction vs Baseline ~18%
Forecast Horizon 90 days
CV Strategy Walk-forward (365d init, 90d step)

Project Structure

project1-retail-forecasting/
├── data/
│   ├── raw/            ← train.csv, store.csv (download from Kaggle)
│   └── processed/      ← forecast & CV outputs (generated by notebooks)
├── notebooks/
│   ├── 01_eda.ipynb    ← 8-section EDA with 6 visualisation exports
│   └── 02_prophet_model.ipynb  ← Prophet training + walk-forward CV
├── dashboard/
│   └── app.py          ← 4-tab Streamlit dashboard
├── src/
│   └── features.py     ← Reusable feature engineering module
├── model/              ← Saved Prophet model (joblib)
├── reports/figures/    ← Exported PNG plots
├── requirements.txt
└── README.md

Quickstart

1. Install dependencies

pip install -r requirements.txt

2. Download dataset

From Kaggle: https://www.kaggle.com/c/rossmann-store-sales/data
Place train.csv and store.csv in data/raw/

3. Run notebooks in order

jupyter notebook notebooks/01_eda.ipynb
jupyter notebook notebooks/02_prophet_model.ipynb

4. Launch dashboard

streamlit run dashboard/app.py

Tech Stack

Layer Tools
Data Processing Pandas, NumPy
Forecasting Prophet (Meta)
Visualisation Plotly, Matplotlib, Seaborn
Dashboard Streamlit
Serialisation Joblib

Summary

"I built a demand forecasting model on 1 million rows of Rossmann retail data using Meta's Prophet with walk-forward cross-validation. By modelling weekly and yearly seasonality, promotions, and German public holidays as regressors, I achieved ~8.2% MAPE — translating to an estimated 18% reduction in overstock vs a naive same-week-last-year baseline. The output feeds directly into a Streamlit dashboard with 90-day store-level forecasts."


Dataset Credit

Rossmann Store Sales — Kaggle Competition

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors