- Introduction
- Packages Used
- Installation Instructions
- Kaggle CLI Installation and Setup
- Used Data Sources
- Summary of the Approaches Used
- Acknowledgements
This repository contains a collection of Jupyter notebooks detailing a study on time series forecasting methodologies applied to the retail sales domain. The study evaluates the performance of different forecasting models on the Kaggle Rossman Store Sales dataset. The aim is to forecast future sales for multiple stores using a variety of approaches, including SARIMAX, Prophet, and XGBoost regressor, with a particular focus on a multi-store perspective using the XGBoost framework.
A series of Python packages have been utilized in this project, including but not limited to:
- NumPy
- pandas
- matplotlib
- pmdarima
- Prophet
- XGBoost
- scikit-learn
- seaborn
For a complete list of packages and their versions, see requirements.txt
.
To replicate the findings and run the notebooks in your local environment, please follow these steps:
- Clone the repository to your local machine.
- Ensure that Python 3.x is installed.
- Install the required packages using the command:
pip install -r requirements.txt
The Kaggle API is an efficient way to download Kaggle datasets directly into your working environment. Follow the steps below to install the Kaggle CLI and set it up.
- Install the Kaggle API using pip:
pip install kaggle
-
After installation, you need to authenticate using an API token from Kaggle:
- Go to your Kaggle account, scroll to the API section and click on the "Create New API Token" button.
- This will download a
kaggle.json
file containing your API credentials.
-
Place the
kaggle.json
file in the appropriate location:-
On Windows, put it in
C:\Users\<Windows-username>\.kaggle\kaggle.json
-
On Linux and MacOS, put it in
~/.kaggle/kaggle.json
and run the following command to ensure the file remains private:
-
chmod 600 ~/.kaggle/kaggle.json
The dataset used in this project is the Rossman Store Sales dataset available on Kaggle. This dataset includes historical sales data for 1,115 Rossman stores, along with associated promotional and temporal information.
The following forecasting methodologies were explored:
- Exploratory Data Analysis (EDA): Initial analysis to understand the trends, seasonality, and anomalies in the sales data.
- SARIMAX: Seasonal AutoRegressive Integrated Moving Average with eXogenous factors model for single-store forecasting.
- Prophet: A forecasting tool developed by Facebook for its robustness in capturing seasonality and trends with little need for manual tuning.
- XGBoost Regressor: Gradient boosting framework used for single-store sales forecasting.
- XGBoost Multi-Store Model: An extension of the XGBoost model to forecast sales across multiple stores by incorporating store-specific features.
Each notebook in the repository corresponds to a different stage of the project:
00 - EDA.ipynb
: Exploratory Data Analysis01 - ARIMA_model.ipynb
: SARIMAX Model Implementation02 - Prophet_model.ipynb
: Prophet Model Implementation03.1 - XGBoost_model.ipynb
: XGBoost Single-Store Model03.2 - XGBoost_multi_store_model.ipynb
: XGBoost Multi-Store Model
This project was made possible thanks to the availability of the Rossman Store Sales dataset on Kaggle and the contributions of the various authors and maintainers of the Python packages used.