Coder Social home page Coder Social logo

nelaturi / kaggle_walmart-recruiting-store-sales-forecasting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenglongchen/kaggle_walmart-recruiting-store-sales-forecasting

0.0 2.0 0.0 13.11 MB

R code for Kaggle's Walmart Recruiting - Store Sales Forecasting

R 100.00%

kaggle_walmart-recruiting-store-sales-forecasting's Introduction

Kaggle's Walmart Recruiting - Store Sales Forecasting

This is the R code I used to make my submission to Kaggle's Walmart Recruiting - Store Sales Forecasting competition.

My score on the private leaderboard is WMAE = 2561.94597 (with a public LB WMAE=2487.81778), ranking 16th out of 708. The code itself contains lots of comments. So, you'd better see there for details.

This code uses the observation that for the same dept, the weekly sales are very similar despite of different magnitudes across all the stores. To see this, use file visualize_weekly_sales.R or have a look into the visualization folder.

I generates a few features using preprocess_data_v1.R/preprocess_data_v2.R and then train a gbm to model the ts data using train_gbm_cross_store_v1.R/train_gbm_cross_store_v2.R. However, I find my gbm model (version 1.0) can not well capture the periodic pattern of some depts, e.g., dept=1. So, I think there are still room for this approach. Some useful discussions about other competitors' approaches and adjustment can be found on the forum: http://www.kaggle.com/c/walmart-recruiting-store-sales-forecasting/forums/t/8023/thank-you-and-2-rank-model, http://www.kaggle.com/c/walmart-recruiting-store-sales-forecasting/forums/t/8028/a-key-adjustment

Requirements

You should have gbm/geoR/Hmisc installed in R.

Instructions

  • ./data/train.csv
  • ./data/test.csv
  • ./data/features.csv
  • ./data/stores.csv
  • ./data/sampleSubmission.csv
  • my features can take a while to generate, so I'd suggest you download it from this repo and put then in ./data dir
  • run train_gbm_cross_store_v1.R

kaggle_walmart-recruiting-store-sales-forecasting's People

Contributors

chenglongchen avatar

Watchers

James Cloos avatar  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.