Given hierarchical sales data from Walmart, the world’s largest company by revenue, we need to forecast daily sales for the next 28 days.
This is my solution to the M5 Forecasting - Accuracy Kaggle competition. I used a LightGBM to train on the tabular dataset, which was preprocessed to include 7-day and 28-day rolling mean features.
Result: Weighted root mean squared scaled error (RMSSE) score of 0.63730
in the private leaderboard. Ranked 248 out of 5558 teams (Top 5% - silver medal).
To get a local copy up and running, follow these simple example steps.
-
Clone the repo
git clone https://github.com/stephenllh/m5_accuracy.git
-
Change directory
cd m5_accuracy
-
Install packages
pip install requirements.txt
-
Change directory
cd m5_accuracy
-
Create a directory called
input
mkdir input cd input
-
Download the dataset into the folder
- Option 1: Use Kaggle API
pip install kaggle
kaggle competitions download -c m5-forecasting-accuracy
- Option 2: Download the dataset from the competition website.
- Option 1: Use Kaggle API
-
Run the training script
cd .. python train.py
-
(Optional) Run the inference script
python inference.py
Distributed under the MIT License. See LICENSE
for more information.