Git Product home page Git Product logo

kaggle-instacart's Introduction

Instacart Market Basket Analysis Competition

(Work In Progress)

This project is based on my solution to the competition and heavily inspired by Sean Vasquez's solution.

Currently implementation can get .3988546 private and .4001607 public scores.

TODOs:

  1. Port the feature-engineered LightGBM solution into this project (my actual submissions are based on this model)
  2. Try more ideas from Sean's solution:
    • Bernoulli mixture models
    • Order size models
    • Skip-Gram with Negative Sampling (SGNS) models
    • Non-Negative Matrix Factorization (NNMF) models
  3. Neural network models in second layer

Requirements

The code is tested on a computer with 16GB RAM and a GTX 1070 card (with 8GB VRAM).

Python packages:

  • joblib==0.11
  • lightgbm==2.0.4
  • torch==0.2.0.post2
  • numpy==1.13.1
  • pandas==0.20.2
  • scikit-learn==0.18.2

Usage

Preprocessing data

python basket/preprocessing/prepare_users.py

Train and Predict

python train.py

This will:

  1. Train a neural network with T-4 to T-1 orders as training target.
  2. Extract the states of the final layer when predicting T orders.
  3. Use the extracted states to train a GBM model using LightGBM.
  4. Optimize the predictions of the GBM model against F1 metric and create a submission file.

kaggle-instacart's People

Contributors

ceshine avatar

Watchers

 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.