Skip to content

HotBento/KG4RecEval

Repository files navigation

KG4RecEval

Official implement of paper "Does Knowledge Graph Really Matter for Recommender Systems?"

Requirements

Tested on python 3.9 and Ubuntu 20.04.

  1. pytorch==2.0.0
  2. recbole==1.1.1
  3. lightgbm
  4. xgboost
  5. ray
  6. thop
  7. torch_scatter
  8. hyperopt
  9. dgl==0.9.1

Dataset process

Please refer to recbole to download the datasets and our paper for details.

Tips

  1. Our results are saved in ./result. If you want to run experiments, please move ./result to other place or just delete it.
  2. Replace np.float with float in recbole.evaluator.metrics as there is a conflict between recbole and high version of numpy.
  3. Run python main.py -h to see the usage.

No knowledge experiment example

python main.py --experiment noknowledge --dataset lastfm --worker_num 1 --eval_times 5 --model KGAT KGCN RippleNet CFKG CKE KGNNLS KTUP KGIN --test_type_list fact --rate 1 --save_dataset --save_dataloaders

False experiment example

python main.py --experiment false --dataset lastfm --worker_num 1 --rate 0 0.25 0.5 0.75 1.0 --eval_times 5 --model KGAT KGCN RippleNet CFKG CKE KGNNLS KTUP KGIN --test_type_list kg --save_dataset --save_dataloaders

Decrease experiment example

python main.py --experiment decrease --dataset lastfm --worker_num 1 --eval_times 5 --model KGAT KGCN RippleNet CFKG CKE KGNNLS KTUP KGIN  --test_type_list fact entity relation --rate 0.25 0.5 0.75 1 --save_dataset --save_dataloaders

Cold-start experiment example

python main.py --experiment coldstart --dataset lastfm --worker_num 1 --eval_times 5 --model KGAT KGCN RippleNet CFKG CKE KGNNLS KTUP KGIN --test_user_ratio 0.1 --cs_threshold 3 --test_type_list random d_fact --rate 0 0.25 0.5 0.75 1 --save_dataset --save_dataloaders

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages