This is our Tensorflow implementation for our paper based on NeuRec:
Jiancan Wu, Xiangnan He, Xiang Wang, Qifan Wang, Weijian Chen, Jianxun Lian, Xing Xie. 2021. Graph Convolution Machine for Context-aware Recommender System, Paper in arXiv.
The code runs well under python 3.8.10. The required packages are as follows:
- Tensorflow-gpu == 1.15.1
- numpy == 1.18.5
- scipy == 1.7.0
- pandas == 1.3.0
- cython == 0.29.21
Firstly, compline the evaluator of cpp implementation with the following command line:
python setup.py build_ext --inplace
If the compilation is successful, the evaluator of cpp implementation will be called automatically. Otherwise, the evaluator of python implementation will be called.
Note that the cpp implementation is much faster than python.
Further details, please refer to NeuRec.
Secondly, run GCM.py in IDE or with command line:
python GCM.py --dataset Yelp-NC --num_gcn_layers 2 --reg 1e-3 --decoder_type FM --adj_norm_type ls --num_negatives 4
python GCM.py --dataset Yelp-OH --num_gcn_layers 2 --reg 1e-3 --decoder_type FM --adj_norm_type ls --num_negatives 4
python GCM.py --dataset Amazon-Book --num_gcn_layers 2 --reg 1e-3 --decoder_type FM --adj_norm_type ls --num_negatives 2