Git Product home page Git Product logo

mind's Introduction

MIND

Pytorch implementation of paper: Multi-Interest Network with Dynamic Routing for Recommendation at Tmall

Dataset

  • Amazon books ratings, in Files -> "Small" subsets for experimentation -> choose Books ratings only in the table.
  • Amazon books metadata, int Files -> Complete review data -> choose Books metadata in the table.

How to run

  1. Create a folder called data. Download and unzip the data files into the data folder, such that the data folder contains two files: meta_Books.json and ratings_Books.csv.
  2. Run with default config: python main.py
  3. Then you can see the output like this:
preparing data
start training
Epoch 00 | Step 00000 | Loss 25.838057
Epoch 00 | Step 00200 | Loss 2.774709
Epoch 00 | Step 00400 | Loss 1.765235
Epoch 00 | Step 00600 | Loss 1.416502
...
Epoch 49 | Step 02000 | Loss 0.217909
Epoch 49 | Step 02200 | Loss 0.217899
Epoch 49 | Step 02400 | Loss 0.217884
start testing
100%|█████████████████████████████████████████████████| 1630/1630 [00:23<00:00, 67.99it/s]
recall@30: 0.06549379147251112, hitRate@30: 0.3280333304991072

Something about sample building

Each rating action reflect user's interest upon that book, so each rating action is one postive sample, no matter what the actual rating value is. From my point of view, If the user read the book and gave a rate about it, he is interested in the book anyway. Low rate means he is disappointed with the content, rather than "not interested".

TODOs

  • l2 norm & test via faiss
  • introduce meta data and:
    • item embedding distribution
    • take a look into interest caps

mind's People

Contributors

wang-yu-qing avatar

Stargazers

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