GithubHelp home page GithubHelp logo

sandy4321 / kaggle_m5_forecasting_accuracy_pro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greak-1124/kaggle_m5_forecasting_accuracy_pro

0.0 1.0 0.0 222 KB

This is a competition M5 forecasting - accuracy on kaggle. For details, please refer to the link: https://www.kaggle.com/c/m5-forecasting-accuracy/overview. This is my first time to take part in the kaggle competition. After two months of hard work, I finally ranked 172, top4% and won a silver medal.

Python 100.00%

kaggle_m5_forecasting_accuracy_pro's Introduction

Kaggle_M5_Forecasting_Accuracy_top4%_Pro

This is a competition M5 forecasting - accuracy on kaggle. For details, please refer to the link: https://www.kaggle.com/c/m5-forecasting-accuracy/overview. This is my first time to take part in the kaggle competition. After two months of hard work, I finally ranked 172, top4% and won a silver medal.

Catalogue introduction

dataset: The directory where the dataset is stored.
features: The pkl file for generating features is stored in this directory.
models: The model files generated in the training process are placed in it.
sub: The generated CSV file is placed in this directory.
utils.py: Contains some of the functions used.
fe.py: Execution via Python fe.py generate feature files to the features directory.
train_state.py: By training the dataset according to the state partition, the state.csv will be created in the sub directory.
train_store.py: By training the dataset according to the store partition, the store.csv will be created in the sub directory.
fusion.py: The state.csv and store.csv are weighted and fused according to different weights.
pictures: Saving the pictures.

How to run

1.Python fe.py
2.Python train_state.py
3.Python train_store.py
4.Python fusion.py
You can also write the above steps as a script to run.

Overall framework

  1. First of all, we passed the fe.py Production features, including holiday features, price features, lag features, etc.
  2. There are three states in this data set, including CA, TX and WI. However, we only read the data of two states according to CA and WI, and use LGB for training, because we found that the effect of reading CA and WI state training is better than that of TX.
  3. We read data from 10 stores, train them separately, and get the model of 10 stores. Finally, we forecast the sales volume of each store in 28 days.
  4. We read the predictions of CA and WI states according to the stores of each state, and get the stores of CA_x and WI_x, respectively, and weighted fusion with the predicted stores of CA_x and WI_x to get the final result. The overall flow is shown below:
    models_picture

kaggle_m5_forecasting_accuracy_pro's People

Contributors

greak-1124 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.