Coder Social home page Coder Social logo

comirec's Introduction

Controllable Multi-Interest Framework for Recommendation

Original implementation for paper Controllable Multi-Interest Framework for Recommendation.

Yukuo Cen, Jianwei Zhang, Xu Zou, Chang Zhou, Hongxia Yang, Jie Tang

Accepted to KDD 2020 ADS Track!

Prerequisites

  • Python 3
  • TensorFlow-GPU >= 1.8 (< 2.0)
  • Faiss-GPU

Getting Started

Installation

Dataset

Training

Training on the existing datasets

You can use python src/train.py --dataset {dataset_name} --model_type {model_name} to train a specific model on a dataset. Other hyperparameters can be found in the code. (If you share the server with others or you want to use the specific GPU(s), you may need to set CUDA_VISIBLE_DEVICES.)

For example, you can use python src/train.py --dataset book --model_type ComiRec-SA to train ComiRec-SA model on Book dataset.

When training a ComiRec-DR model, you should set --learning_rate 0.005.

Training on your own datasets

If you want to train models on your own dataset, you should prepare the following three(or four) files:

  • train/valid/test file: Each line represents an interaction, which contains three numbers <user_id>,<item_id>,<time_stamp>.
  • category file (optional): Each line contains two numbers <item_id>,<cate_id> used for computing diversity..

Common Issues

The computation of NDCG score.
I'm so sorry that the computation of NDCG score is not consistent with the original definition, as mentioned in the issue #6. I have updated the computation of NDCG score in the dev branch according to the original definition. Therefore, I personally recommend to use the results of recall and hit rate only.

If you have ANY difficulties to get things working in the above steps, feel free to open an issue. You can expect a reply within 24 hours.

Acknowledgement

The structure of our code is based on MIMN.

Cite

Please cite our paper if you find this code useful for your research:

@inproceedings{cen2020controllable,
  title = {Controllable Multi-Interest Framework for Recommendation},
  author = {Cen, Yukuo and Zhang, Jianwei and Zou, Xu and Zhou, Chang and Yang, Hongxia and Tang, Jie},
  booktitle = {Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
  year = {2020},
  pages = {2942โ€“2951},
  publisher = {ACM},
}

comirec's People

Contributors

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