Skip to content

sandl99/Simple-KGCN-GraphSAINT

Repository files navigation

Simple KGCN and GraphSAINT for Recommendation System

Dang Lam San - Thesis 2021.

Video demo for the training phase

Video Demo.

Step for install

Install requirements

pip install torch-scatter torch-sparse -f https://pytorch-geometric.com/whl/torch-1.8.0+cu101.html

Download data and knowledge graph from drive.

Extract data.zip to folder data
unzip ./data.zip

Download movielens-20M and extract.

wget http://files.grouplens.org/datasets/movielens/ml-20m.zip
unzip ml-20m.zip
mv ml-20m/ratings.csv KGraph/data/movie/

Preprocess data

cd graphsaint/kgraphsaint
python preprocess.py -d music
python preprocess.py -d movie
cd ../../ \

Building C++ module for Sampling

python graphsaint/setup.py build_ext --inplace

Training Phase

python -m graphsaint.kgraphsaint.train --lr 1e-3 --sampler node --l2_weight 1e-5

Experimental results

Model MovieLens – 20M MovieLens – 20M Last.FM Last.FM
AUC F1 AUC F1
KGCN 0.975 0.928 0.791 0.710
SKGCN – Node 0.977 0.931 0.808 0.725
SKGCN – Edge 0.977 0.977 0.811 0.731
SKGCN – Rw 0.976 0.929 0.810 0.731

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published