Skip to content

Aims to predict precisely the future sales across diverse retail outlets. Part of the minor project of VII Semester MEC755 Course, Mechanical Engineering, batch of 2021 - 2025

Notifications You must be signed in to change notification settings

wthrajat/demand-supply-forecasting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEC755 Minor Project, Mechanical Engineering: Demand Supply Forecasting

This project has been created as the part of the 7th semester's course MEC755 Minor Project, Mechanical Engineering. The team members are listed as follows:

Roll Number Name
UE219055 Rajat Khanduri
UE219041 Lakshya Kumar Sharma
UE219058 Rohit Kumar
UE219026 Gautam Goel

Supervisor:

Dr. Tukesh Soni
Professor, Department of Mechanical Engineering, UIET Panjab University
PhD Rotor Dynamics, IIT Delhi
MTech Mechanical Engineering, IIT Kanpur

📋 Introduction

Supply Demand Forecasting using Time Series Forecasting & Neural Networks

Visualise Data
Visualise Data
Visualise Data

Demand forecasting plays a crucial role in supply chain management and retail operations. Accurate demand forecasting ensures that the right product quantities are available at the correct time and location, preventing stockouts or overstocking. This project leverages advanced neural networks and time-series forecasting techniques to address the challenges of demand forecasting in retail stores.

🎯 Project Goal

The primary objective of this project is to develop a cutting-edge forecasting model utilizing advanced machine-learning algorithms and sophisticated time-series analysis techniques. The model aims to deliver precise predictions of future sales across diverse retail outlets. By harnessing data-driven insights, this project seeks to revolutionize sales forecasting, enabling businesses to optimize inventory management, streamline resource allocation, and maximize profitability.

📊 Dataset Description

  • Data Source: Store Item Demand Forecasting Challenge dataset from Kaggle.
  • Attributes:
    • Date: Date of the sales record.
    • Store ID: Identifier for the store.
    • Item ID: Identifier for the item.
    • Sales: Number of units sold.
  • Data Span: Sales data from January 1, 2013, to December 31, 2017, across 10 stores for 50 items.

🛠️ Data Preprocessing

  • Duplicates: Verified absence to ensure data integrity.
  • Date Format: Standardized for consistency.
  • Null Values: Checked and confirmed none present.
  • Correlation: Acknowledged weak correlations with sales but opted for an inclusive approach.
  • Train/Test Split: Sorted data chronologically with a 75%/25% split.

🚀 Methodology

Model Selection

  • Advanced Time Series Models:
    • Bi-LSTM (Bidirectional Long Short-Term Memory)
    • LSTM+CNN (Long Short-Term Memory combined with Convolutional Neural Network)
    • BiLSTM+CNN (Hybrid of Bidirectional Long Short-Term Memory and Convolutional Neural Network)
  • Baseline Regression Models:
    • Random Forest Classifier
    • XGBoost Regressor
    • Artificial Neural Network (ANN)
    • Convolutional Neural Networks (CNN)
    • ARIMA

Data Transformation

  • Encoding:
    • Label encoding for Store IDs and Item IDs.
    • Transformation of the DATE variable into a discrete ordinal attribute.
  • Tools and Technologies:
    • Python, Pandas, Numpy, Scikit-learn, Keras, TensorFlow, Matplotlib

📈 Modeling and Evaluation

Baseline Models

  • Machine Learning Algorithms:
    • Random Forest Regressor
    • CNN
    • XGBoost Regressor
    • ANN

Time-Series Models

  • Models Used:
    • LSTM
    • ARIMA
    • BiLSTM
    • LSTM+CNN Hybrid (Our Model)
    • BiLSTM+CNN Hybrid (Our Model)

Our Model

Project Banner

The hybrid model, developed from scratch, combines Convolutional Neural Network (CNN) and Long Short-Term Memory (LSTM) components. In this architecture, the CNN segment convolves over input data, extracting spatial features, while the LSTM captures temporal dependencies. Both pathways then undergo dense layers for feature refinement before combining their outputs for accurate prediction or classification.

The models were hand-tuned and a batch size of 256 was suitable for training.

BiLSTM-CNN which is one of our other models also has a similar architecture in which a Bidirectional Wrapper just surrounds each LSTM layer.

Evaluation Metrics

  • Mean Squared Error (MSE): Used to quantify the average squared magnitude of errors between predicted and actual values.

How to run the project

  • Git clone and change directory to the repo:
    git clone https://github.com/wthrajat/demand-supply-forecasting.git
    cd demand-supply-forecasting
  • Create and activate the Python Virtual Environment:
    python3 -m venv my_env
    source my_env/bin/activate
  • Install dependencies:
    pip install -r requirements.txt
  • Ensure you have Jupyter Notebook installed. You can install it using pip if you don't have it already:
    pip install notebook
  • Start the Jupyter notebook server and navigate to the final .ipynb file and run the cells up to down:
    jupyter notebook

📚 References

  1. A. Krishna A. V A. Aich and C. Hegde, "Sales-forecasting of Retail Stores using Machine Learning Techniques," 2018 3rd International Conference on Computational Systems and Information Technology for Sustainable Solutions (CSITSS), Bengaluru, India, 2018, pp. 160-166, doi: 10.1109/CSITSS.2018.8768765
  2. Y. Ali and S. Nakti, "Sales Forecasting: A Comparison of Traditional and Modern Times-Series Forecasting Models on Sales Data with Seasonality," 2018
  3. F.-C. Yuan and C.-H. Lee, "Sales Volume Forecasting Decision Models," 2011 International Conference on Technologies and Applications of Artificial Intelligence, Chung Li, Taiwan, 2011, pp. 239-244, doi: 10.1109/TAAI.2011.49

About

Aims to predict precisely the future sales across diverse retail outlets. Part of the minor project of VII Semester MEC755 Course, Mechanical Engineering, batch of 2021 - 2025

Topics

Resources

Stars

Watchers

Forks