Giter Site home page Giter Site logo

zwq13647078898 / caser_pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graytowne/caser_pytorch

0.0 1.0 0.0 5.76 MB

A PyTorch implementation of Convolutional Sequence Embedding Recommendation Model (Caser)

License: GNU Lesser General Public License v3.0

Python 100.00%

caser_pytorch's Introduction

Caser-PyTorch

A PyTorch implementation of Convolutional Sequence Embedding Recommendation Model (Caser) from the paper:

Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding, Jiaxi Tang and Ke Wang , WSDM '18

Requirements

Usage

  1. Install required packages.
  2. run python train_caser.py

Configurations

Data

  • Datasets are organized into 2 separate files: train.txt and test.txt

  • Same to other data format for recommendation, each file contains a collection of triplets:

    user item rating

    The only difference is the triplets are organized in time order.

  • As the problem is Sequential Recommendation, the rating doesn't matter, so I convert them to all 1.

Model Args (in train_caser.py)

  • L: length of sequence
  • T: number of targets
  • d: number of latent dimensions
  • nv: number of vertical filters
  • nh: number of horizontal filters
  • ac_conv: activation function for convolution layer (i.e., phi_c in paper)
  • ac_fc: activation function for fully-connected layer (i.e., phi_a in paper)
  • drop_rate: drop ratio when performing dropout

Citation

If you use this Caser in your paper, please cite the paper:

@inproceedings{tang2018caser,
  title={Personalized Top-N Sequential Recommendation via Convolutional Sequence Embedding},
  author={Tang, Jiaxi and Wang, Ke},
  booktitle={ACM International Conference on Web Search and Data Mining},
  year={2018}
}

Comments

  1. This PyTorch version may get better performance than what the paper reports.

    When d=50, L=5, T=3, and set other arguments to default, after 20 epochs, mAP may get to 0.17 on the test set.

Acknowledgment

This project (utils.py, interactions.py, etc.) is heavily built on Spotlight. Thanks Maciej Kula for his great work.

caser_pytorch's People

Contributors

graytowne avatar laiw1996 avatar

Watchers

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