This project provides a flexible sales forecasting solution for retail businesses, offering multiple methods for predicting sales across different stores and items. The primary goal is to help retailers optimize inventory management and sales strategies through data-driven insights. Training dataset and final results were uploaded to the Kaggle Challenge
-
Multiple Forecasting Methods
- Average-based forecasting
- Extensible architecture for adding new prediction methods
- Store-level and item-level sales analysis
-
Logging and Monitoring
- Detailed logging for tracking script execution
- Python 3.8+
- Required libraries:
- pandas
- numpy
- scikit-learn (for future method implementations)
-
Clone the repository:
git clone https://github.com/your-username/retail-forecasting.git cd retail-forecasting -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
Basic usage:
python main.py --data ./data --method avg --output ./submissions/forecast.csv--data: Path to the data directory (default: 'data')--method: Forecasting method to use (currently supports 'avg')--output: Path to save the submission file
avg: Average-based sales prediction- More methods can be added by extending the base method class
retail-forecasting/
│
├── main.py # Main script for running forecasts
├── method # Method classes
├── util/
│ └── preprocess.py # Data preprocessing utilities
├── data/ # Raw data directory
└── submissions/ # Output forecasts
| Date | Submission Description | Score | User |
|---|---|---|---|
| 2024-12-19 | Feature engineering and tuning | 0.13567 | |
| 2024-12-20 | Ensemble with XGBoost and LightGBM | 0.14567 |
Distributed under the MIT License. See LICENSE for more information.