Skip to content

PyTorch Implemenation for Neural Graph Collaborative Filtering

Notifications You must be signed in to change notification settings

liu-jc/PyTorch_NGCF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch Implementation for Neural Graph Collaborative Filtering

This is a PyTorch Implemenation for this paper:

Xiang Wang, Xiangnan He, Meng Wang, Fuli Feng, and Tat-Seng Chua (2019). Neural Graph Collaborative Filtering. SIGIR 2019

Original TensorFlow Implementation can be found here

Environment Requirement

You may simply run pip install -r requirements.txt

In this implementation, we use Python 3.7.5 with CUDA 10.1. The required packages are as follows:

  • pytorch==1.3.1
  • numpy==1.16.4
  • scipy==1.4.1
  • scikit-learn==0.22

Run the Code

NGCF

  • Gowalla:
python main.py --dataset gowalla --alg_type ngcf --regs [1e-5] --embed_size 64 --layer_size [64,64,64] --lr 0.0001 --save_flag 1 --pretrain 0 --batch_size 4096 --epoch 500 --verbose 1 --mess_dropout [0.1,0.1,0.1] 
  • Amazon-book:
python main.py --dataset amazon-book --alg_type ngcf --regs [1e-5] --embed_size 64 --layer_size [64,64,64] --lr 0.0005 --save_flag 1 --pretrain 0 --batch_size 4096 --epoch 500 --verbose 1 --mess_dropout [0.1,0.1,0.1]

MF

  • Gowalla:
python main.py --dataset gowalla --alg_type mf --regs [1e-5] --embed_size 64  --lr 0.0001 --save_flag 1 --pretrain 0 --batch_size 4096 --epoch 500 --verbose 1 
  • Amazon-book:
python main.py --dataset amazon-book --alg_type mf --regs [1e-5] --embed_size 64  --lr 0.0005 --save_flag 1 --pretrain 0 --batch_size 4096 --epoch 500 --verbose 1 --mess_dropout [0.1,0.1,0.1]

Dataset

Datasets and Data files are the same as thoese in the original repository.

Releases

No releases published

Packages

No packages published

Languages