Skip to content

Efrrowini/sales-forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sales Forecasting — Prophet vs LightGBM

Time series forecasting on Rossmann Store Sales dataset
LightGBM MAPE: 9.47% vs Prophet baseline 15.48% — 39% improvement

Streamlit App

Dashboard demo


Business problem

Retail chains need accurate sales forecasts to optimize inventory, staffing, and promotions. This project builds a forecasting system on 1,115 Rossmann stores, predicting daily sales 6 weeks ahead and comparing statistical vs ML approaches.


Live demo

Resource Link
Streamlit dashboard sales-forecasting-efro.streamlit.app
GitHub repo github.com/Efrrowini/sales-forecasting

Results

Model MAPE (%) RMSE MAE
Prophet (baseline) 15.48 753 667
LightGBM 9.47 902 626

LightGBM achieves 39% lower MAPE than Prophet by learning store-level patterns through lag and rolling features.


Key EDA findings

  • Promotions drive 38.8% sales uplift (EUR5,930 → EUR8,229)
  • Clear Christmas spikes every December — sales peak at 2x baseline
  • Monday consistently weakest day, Saturday strongest
  • Store type B highest median sales despite fewer locations

Feature engineering

25+ features engineered from raw date and sales data:

  • Lag features — sales 7, 14, 21, 28 days ago per store
  • Rolling statistics — 7/14/30 day rolling mean and std
  • Calendar features — year, month, week, quarter, is_weekend, is_month_start, is_month_end
  • Store metadata — store type, assortment, competition distance

Architecture


Tech stack

Layer Tools
Data pandas, numpy
Modelling Prophet, LightGBM
Experiment tracking MLflow
Frontend Streamlit, Plotly
Deployment Streamlit Cloud

Run locally

git clone https://github.com/Efrrowini/sales-forecasting
cd sales-forecasting
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

# Build features
python -m src.features

# Train LightGBM
python -m src.train_lgbm

# Run dashboard
streamlit run app/streamlit_app.py

Dataset

Rossmann Store Sales — 1,115 German drugstores, 2.5 years of daily sales data. Available on Kaggle.


Built by Efro | Presidency University Bangalore | Data Science Portfolio

About

Time series sales forecasting — Prophet vs LightGBM on Rossmann dataset. MAPE 9.47%. Deployed on Streamlit Cloud.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors