Giter Club home page Giter Club logo

dream's Introduction

DREAM

This repository contains my implementations of DREAM for next basket prediction. Besides I extendted the DREAM Framework to reorder prediction scenario. And it helped me earn 39/2669 place in Kaggle Instacart Reorder Prediction Competition. For anyone who is interested, please check this page for details about the Instacart competition.

Model

DREAM uses RNN to capture sequential information of users' shopping behavior. It extracts users' dynamic representations and scores user-item pair by calculating inner products between users' dynamic representations and items' embedding.

Refer to the following paper:

Yu, Feng, et al. "A dynamic recurrent model for next basket recommendation." Proceedings of the 39th International ACM SIGIR conference on Research and Development in Information Retrieval. ACM, 2016.

for details about DREAM.

Dataset

It runs on the Instacart dataset and can be used in other e-commerce datasets by modifying the input easily.

Files

dream.py

  • definition of DREAM

train.py

  • implementation of bpr loss function
  • implemeantation of reorder bpr loss function
  • training of DREAM

eval.py

  • calculate <u,p> score using DREAM

data.py

  • input wrapper for DREAM
  • based on the Instacart Dataset

utils.py

  • some useful functions

config.py

  • DREAM configurations

constants.py

  • some constants such as file path

Make Recommendation Using DREAM.ipynb

  • using trained DREAM model to generate predictors for <u,p>

Requirements

  • tensorboard
  • tensorboardX
  • pytorch == 0.3
  • pandas == 0.19.2
  • scikit-learn == 0.18.1

You need GPU to accelerate training.

License

Copyright (c) 2018 Yihong Chen

dream's People

Contributors

yihong-chen avatar

Watchers

 avatar  avatar

Forkers

babylls

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.