Skip to content

AI-driven system for detecting abnormal demand patterns in supply chain time-series data using statistical analysis and machine learning.

Notifications You must be signed in to change notification settings

NarayanKabra21/Intelligent-Demand-Anomaly-Detection-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Intelligent Demand Anomaly Detection System

πŸ“Œ Project Overview

Modern supply chains depend on stable demand patterns for effective inventory planning and operational efficiency. Sudden and unexpected changes in demandβ€”such as sharp spikes or dropsβ€”can lead to stock-outs, excess inventory, financial losses, and operational disruptions.

This project implements an Intelligent Demand Anomaly Detection System that identifies abnormal demand behavior from large-scale time-series data. Instead of forecasting demand, the system focuses on monitoring demand stability and detecting deviations from normal patterns using time-series analysis and machine learning.


🎯 Problem Statement

To detect unusual demand patterns in time-series sales data and classify them as potential anomalies using statistical techniques and unsupervised machine learning models.


🧠 System Objectives

  • Learn normal demand behavior from historical data
  • Continuously monitor demand over time
  • Automatically detect and flag:
    • Sudden demand spikes
    • Unexpected demand drops
    • Irregular demand fluctuations

These anomalies can indicate potential supply chain risks or operational issues.


πŸ“‚ Dataset Description

The project uses a large synthetic dataset designed to simulate real-world supply chain demand behavior.

Dataset Columns

  • date – Daily timestamp
  • demand – Observed demand value

πŸ›  Tools & Technologies

  • Python
  • Pandas, NumPy
  • Matplotlib, Seaborn
  • Scikit-learn
  • Statsmodels
  • Jupyter Notebook
  • Git & GitHub

πŸ” Data Science Techniques Used

  • Time-series data analysis
  • Trend and seasonality decomposition
  • Feature engineering (lag features, rolling mean, rolling standard deviation)
  • Unsupervised anomaly detection
  • Isolation Forest algorithm
  • Data-driven business interpretation

🧩 Project Workflow

  1. Data Generation – Creation of large-scale daily demand data
  2. Data Cleaning – Handling missing values and preparing time-series structure
  3. Exploratory Data Analysis (EDA) – Understanding demand trends and variability
  4. Time-Series Analysis – Decomposition into trend, seasonality, and residuals
  5. Feature Engineering – Lag-based and rolling statistical features
  6. Anomaly Detection – Detection of abnormal demand using Isolation Forest
  7. Visualization & Interpretation – Highlighting anomalies and extracting insights

πŸ“Š Key Insights

  • Approximately 3% of demand observations were identified as anomalies
  • Detected anomalies correspond to sudden demand spikes and drops
  • Rolling statistics significantly improve anomaly detection accuracy
  • Isolation Forest effectively detects anomalies without labeled data

πŸ“ˆ Business Impact

This system functions as an early warning mechanism for supply chain operations by:

  • Enabling proactive inventory adjustments
  • Reducing losses due to demand shocks
  • Improving operational planning and responsiveness
  • Supporting real-time monitoring of demand stability

▢️ How to Run This Project

  1. Clone the repository:
git clone https://github.com/<your-username>/Intelligent-Demand-Anomaly-Detection-System.git

cd Intelligent-Demand-Anomaly-Detection-System



## πŸ“ Project Structure


Intelligent-Demand-Anomaly-Detection-System/
β”‚
β”œβ”€β”€ data/
β”‚   └── large_demand_data.csv
β”‚
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ 01_data_generation.ipynb
β”‚   β”œβ”€β”€ 02_data_cleaning.ipynb
β”‚   β”œβ”€β”€ 03_eda.ipynb
β”‚   β”œβ”€β”€ 04_time_series_analysis.ipynb
β”‚   └── 05_anomaly_detection.ipynb
β”‚
└── README.md

About

AI-driven system for detecting abnormal demand patterns in supply chain time-series data using statistical analysis and machine learning.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published