Skip to content

End-to-end demand forecasting and inventory optimization with Databricks - multi-modal ML (time series, images, tabular), LightGBM, MAPIE conformal prediction and MLOps for retail and fashion.

License

Notifications You must be signed in to change notification settings

KuchikiRenji/End-to-end_Demand_forecasting_inventory_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

End-to-End Demand Forecasting and Inventory Optimization

Machine learning–powered demand forecasting and inventory optimization for retail and fashion. This project implements a full pipeline on Databricks: multi-modal data (time series, images, tabular), uncertainty-aware forecasting with conformal prediction, and MLOps with drift monitoring and inventory dashboards.


Table of Contents


Overview

This repository demonstrates end-to-end demand forecasting and inventory optimization using Databricks. It uses real-world fashion industry data from Visuelle 2.0.
More on the dataset: Visuelle – Humatics Lab.

What this project covers:

  • Structured streaming and processing for multi-modal data (images, time series, and tabular)
  • Bronze → Silver → Gold data pipeline and MLOps for training and evaluating ML models
  • Multi-modal forecasting (LightGBM + Nixtla MLForecast) with image embeddings
  • Uncertainty quantification via conformal prediction (MAPIE)
  • MLOps dashboards for model monitoring, error analysis, and inventory optimization

Author & Contact

KuchikiRenji

Email KuchikiRenji@outlook.com
GitHub github.com/KuchikiRenji
Discord kuchiki_renji

Features

Feature Description
Multi-modal data Sales, price, weather, Google Trends, customer stats, and image embeddings (imgbeddings)
Medallion architecture Bronze (raw) → Silver (cleaned) → Gold (forecast-ready and inventory)
Demand forecasting 2-weeks-in → 1-week-ahead forecasts with LightGBM (Tweedie) and Nixtla MLForecast
Uncertainty Prediction intervals via MAPIE (conformal prediction)
MLOps Evidently AI for data/target drift and regression quality; MLflow for model registry and serving
Inventory Gold tables and dashboards for restock and inventory optimization

Technology Stack

  • Platform: Databricks (Spark, Delta, Unity Catalog)
  • Forecasting: Nixtla (MLForecast), LightGBM
  • Uncertainty: MAPIE (conformal prediction)
  • Image embeddings: imgbeddings
  • Monitoring: Evidently AI
  • Model registry & serving: MLflow, Databricks Unity Catalog

Project Structure

├── src/
│   ├── data_preprocessing/
│   │   ├── bronze/          # Raw ingestion (sales, price, weather, gtrends, customer, clothes, restock)
│   │   ├── silver/          # Cleaned and joined tables
│   │   └── gold/            # Forecast inputs, forecasted outputs, inventory, restock, image embeddings
│   ├── model_training/      # Nixtla + LightGBM + MAPIE training notebook
│   ├── model_evaluating/    # Evidently AI drift and regression monitoring
│   └── model_serving/       # MLflow model registration and serving API
├── LICENSE
└── README.md

Data Pipeline

End-to-end flow from raw data to forecasts and inventory:

data_pipeline


Dashboards

Monitoring and analyzing error

dashboard_error

Monitoring and optimizing inventory

dashboard_stock

Data drift for MLOps

drift_analysis_plot

test_data_plot

data_target_effect_plot


Usage & License

This project is for educational and experimental use and is non-commercial. Usage must comply with the license of the data source (Visuelle 2.0).

This project is licensed under the MIT License. See the LICENSE file for details.


Disclaimer

This work is not affiliated with or endorsed by any third parties. The author assumes no responsibility for the accuracy, completeness, or consequences of using the content provided. Use of the materials in this repository is at your own risk.


Keywords (for discoverability)

Demand forecasting · Inventory optimization · Time series forecasting · Retail analytics · Fashion demand · Machine learning · MLOps · Databricks · LightGBM · Conformal prediction · MAPIE · Nixtla · Evidently AI · Multi-modal ML · PySpark · Delta Lake

About

End-to-end demand forecasting and inventory optimization with Databricks - multi-modal ML (time series, images, tabular), LightGBM, MAPIE conformal prediction and MLOps for retail and fashion.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published