/GraphRec_PyTorch

A PyTorch implementation of Graph Neural Networks for Social Recommendation (GraphRec)

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

GraphRec_PyTorch

A PyTorch implementation of the GraphRec model in Graph Neural Networks for Social Recommendation (Fan, Wenqi, et al. "Graph Neural Networks for Social Recommendation." The World Wide Web Conference. ACM, 2019).

architecture

Usage

  1. Install required packages from requirements.txt file.
pip install -r requirements.txt
  1. Preprocess dataset. Two pkl files named dataset and list should be generated in the respective folders of the dataset.
python preprocess.py --dataset Ciao
python preprocess.py --dataset Epinions
  1. Run main.py file to train the model. You can configure some training parameters through the command line.
python main.py
  1. Run main.py file to test the model.
python main.py --test