Skip to content

Latest commit

 

History

History
36 lines (32 loc) · 1.76 KB

File metadata and controls

36 lines (32 loc) · 1.76 KB

Enhance-KG-based-Recommender-System-by-entity-modeling

A PyTorch implementation of the paper "An Extended Knowledge Graph-based Recommendation System Utilizing External Knowledge Base".

Run the Codes

  • Setting 1: Utilizing [MovieLens] entities
python main_kgat.py --use_pretrain 0 --data_name setting_1 --cf_batch_size 16 --kg_batch_size 32 --test_batch_size 16 --evaluate_every 1
  • Setting 2: Utitlizing [MovieLens] entities + is_similar_user + is_similar_item
python main_kgat.py --use_pretrain 0 --data_name setting_2 --cf_batch_size 16 --kg_batch_size 32 --test_batch_size 16 --evaluate_every 1
  • Setting 3: Utitlizing [MovieLens + TMDB] entities + is_similar_cluster + is_similar_storyline
python main_kgat.py --use_pretrain 0 --data_name setting_3 --cf_batch_size 16 --kg_batch_size 32 --test_batch_size 16 --evaluate_every 1
  • Setting 3: Utitlizing [MovieLens + TMDB] entities + is_similar_cluster + is_similar_storyline + is_similar_user + is_similar_item
python main_kgat.py --use_pretrain 0 --data_name setting_4 --cf_batch_size 16 --kg_batch_size 32 --test_batch_size 16 --evaluate_every 1

Test the performance of Text embedding features

image

# Move to TextModel folder
python main.py
python predict.py

Obatin KG data(Relation Modeling)

image

# Move to RelationModeling folder
run all cells of the relatiton_modeling.ipynb file