GithubHelp home page GithubHelp logo

torch-recommenders's Introduction

torch-recommenders

Recommendation System Models by Pytorch

Models

Model Paper
Factorization Machine S Rendle, "Factorization Machines", 2010.
Field-aware Factorization Machines Y Juan, et al. "Field-aware Factorization Machines for CTR Prediction", 2015.
Wide&Deep HT Cheng, et al. "Wide & Deep Learning for Recommender Systems", 2016.
DeepFM H Guo, et al. "DeepFM: A Factorization-Machine based Neural Network for CTR Prediction", 2017.
Graph Convolutional Networks Kipf & Welling. "Semi-Supervised Classification with Graph Convolutional Networks", 2016.
Neural Collaborative Filtering He, Xiangnan, et al. "Neural collaborative filtering", 2017.
Self-Attentive Sequential Recommendation W. Kang and J. McAuley, "Self-Attentive Sequential Recommendation", 2018.

Model Comparison

MovieLens(ml-1m) is used as the dataset for model comparision. To evaluate the performance of item recommendation, I adopted the leave-one-out evaluation, which has been widely used in many literatures (NCF, Wide&Deep, SASRec). Use k=10 (top 10 recommendations) for ranking metrics. The Hyperparameters for each model are in model.ini.

MovieLens-1m

Model mAP@k nDCG@k HR@k
FM 0.353 0.439 0.716
FFM 0.355 0.441 0.717
Wide&Deep 0.306 0.389 0.659
DeepFM 0.341 0.424 0.693
NeuMF 0.339 0.422 0.692
SASRec 0.478 0.554 0.797

KMRD-2m

Model mAP@k nDCG@k HR@k
SASRec 0.757 0.805 0.955

Examples

  • FM python main.py --model=fm
  • FFM python main.py --model=ffm
  • Wide & Deep python main.py --model=wd
  • DeepFM python main.py --model=dfm
  • NMF python main.py --model=nmf
  • SASRec python main_sasrec.py --model=sasrec

Requirements

* python>=3.8.12
* pytorch>=1.10.2
* numpy>=1.21.2
* pandas>=1.3.5
* scipy>=1.5.4
* tensorboardX>=2.5 (mainly useful when you want to visulize the loss, see https://github.com/lanpa/tensorboard-pytorch)

References

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.