A data-driven decision support system that combines demand forecasting, inventory-oriented analysis, and customer segmentation to help businesses reduce stockouts, avoid overstock, and make more informed replenishment decisions.
Inventory decisions are among the most critical drivers of operational efficiency in retail and supply chain environments. Underestimating demand can lead to stockouts, lost sales, and dissatisfied customers, while overestimating demand can result in excess inventory, increased holding costs, and inefficient capital allocation.
This project addresses that problem by building an end-to-end analytics workflow that:
- analyzes historical sales behavior,
- forecasts future demand across different time granularities,
- compares forecasting performance across models,
- supports inventory planning decisions with interpretable outputs,
- and enriches the business perspective with RFM-based customer segmentation.
The goal is not only to generate predictions, but to turn those predictions into a practical inventory management and decision support framework.
Retail businesses need to make accurate stocking decisions in order to balance product availability and cost efficiency.
This project was developed to answer questions such as:
- Which products are likely to experience higher demand in upcoming periods?
- How can future sales be estimated using historical transactional data?
- Which forecasting approach performs better for this demand structure?
- How can forecast outputs support inventory planning and replenishment decisions?
- Which customer groups should be prioritized when inventory pressure or excess stock occurs?
By solving these questions, the system aims to support:
- smarter stock planning,
- reduced overstock and stockout risk,
- better resource allocation,
- and more targeted commercial actions.
The main objectives of this project are:
- Forecast product demand using historical sales data
- Compare forecasting models and identify the most suitable approach
- Build a business-friendly structure for inventory-oriented decision-making
- Aggregate demand at multiple time levels such as weekly, monthly, and quarterly
- Generate interpretable outputs for dashboarding and monitoring
- Integrate RFM analysis to support customer-focused actions, especially for products with stock pressure
This project follows a structured analytical pipeline:
-
Data Preparation
- Raw sales and product-level data are cleaned and transformed
- Temporal fields are standardized
- Sales are aggregated for different forecasting horizons
-
Exploratory Data Analysis
- Sales patterns, seasonality, and distribution behavior are examined
- Product and time-based trends are analyzed
- Inventory-relevant insights are extracted
-
Demand Forecasting
- Historical demand is modeled to estimate future sales
- Forecasting is performed at different aggregation levels
- Model outputs are compared using performance metrics
-
Model Evaluation
- Alternative forecasting approaches are evaluated against one another
- Results are summarized in a model comparison layer
- The best-performing setup is identified for decision support
-
Customer Segmentation Support
- RFM analysis is incorporated to better interpret commercial actions
- This allows the business to connect inventory decisions with customer value and loyalty patterns
-
Dashboard / Application Layer
- Results are presented in a more accessible format for business interpretation
- Summary tables and visualization-ready outputs are prepared for decision-makers
- Multi-step demand forecasting workflow
- Inventory-focused business framing
- Forecast aggregation at weekly, monthly, and quarterly levels
- Model comparison and performance tracking
- RFM-based customer segmentation support
- Dashboard-ready summary outputs
- Streamlit-based application structure for usability and presentation
Programming Language
- Python
Core Libraries
- pandas
- numpy
- scikit-learn
- tensorflow
Application / Visualization
- streamlit
- altair
Demand-forecasting-based-inventory-management-system/
│
├── app.py # Streamlit application interface
├── main.py # Main execution pipeline
├── eda.py # Exploratory data analysis
├── forecasting.py # Forecasting workflow
├── rfm.py # RFM segmentation logic
├── run_analysis.py # Analysis runner / helper script
├── requirements.txt # Project dependencies
│
├── data/
│ ├── df.csv
│ ├── df_merged.csv
│ ├── weekly_sales.csv
│ ├── monthly_sales.csv
│ ├── quarterly_sales.csv
│ ├── aggregated_weekly_sales.csv
│ ├── aggregated_monthly_sales.csv
│ ├── aggregated_quarterly_sales.csv
│ ├── model_comparison.csv
│ ├── dashboard_summary.csv
│ ├── dashboard_summary_main.csv
│ └── rfm_results.csv
│
└── .git/