Coder Social home page Coder Social logo

yuanyuansiyuan / kgcn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hwwang55/kgcn

0.0 1.0 0.0 174.9 MB

A tensorflow implementation of KGCN and KGCN-LS (Knowledge Graph Convolutional Networks with Label Smoothness Regularization)

Python 100.00%

kgcn's Introduction

KGCN / KGCN-LS

This repository is the implementation of KGCN (arXiv) and KGCN-LS (arXiv):

Knowledge Graph Convolutional Networks for Recommender Systems
Hongwei Wang, Miao Zhao, Xing Xie, Wenjie Li, Minyi Guo.
In Proceedings of The 2019 Web Conference (WWW 2019)

Knowledge Graph Convolutional Networks for Recommender Systems with Label Smoothness Regularizations
Hongwei Wang, Fuzheng Zhang, Mengdi Zhang, Jure Leskovec, Miao Zhao, Wenjie Li, Zhongyuan Wang.
In Proceedings of The 25th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 2019)

KGCN is Knowledge Graph Convolutional Networks for recommender systems, which uses the technique of graph convolutional networks (GCN) to proces knowledge graphs for the purpose of recommendation. KGCN-LS (Knowledge Graph Convolutional Networks with Label Smoothness regularization) further improves KGCN by adding a label smoothness regularizer in the loss function for more powerful and adaptive learning.

Files in the folder

  • data/
    • movie/
      • item_index2entity_id.txt: the mapping from item indices in the raw rating file to entity IDs in the KG;
      • kg.txt: knowledge graph file;
    • music/
      • item_index2entity_id.txt: the mapping from item indices in the raw rating file to entity IDs in the KG;
      • kg.txt: knowledge graph file;
      • user_artists.dat: raw rating file of Last.FM;
    • restaurant/
      • Dianping-Food.zip: containing the final rating file and the final KG file;
  • src/: implementations of KGCN and KGCN-LS.

Running the code

  • Movie
    (The raw rating file of MovieLens-20M is too large to be contained in this repository. Download the dataset first.)
    $ wget http://files.grouplens.org/datasets/movielens/ml-20m.zip
    $ unzip ml-20m.zip
    $ mv ml-20m/ratings.csv data/movie/
    $ cd src
    $ python preprocess.py --dataset movie
    $ python main.py (settings for KGCN and KGCN-LS are different. Plase carefully choose the corresponding code blocks in main.py)
    
  • Music
    • $ cd src
      $ python preprocess.py --dataset music
      
    • open src/main.py file;

    • comment the code blocks of parameter settings for MovieLens-20M;

    • uncomment the code blocks of parameter settings for Last.FM;

    • $ python main.py (settings for KGCN and KGCN-LS are different. Plase carefully choose the corresponding code blocks in main.py)
      
  • Restaurant
    $ cd data/restaurant
    $ unzip Dianping-Food.zip
    
    • open src/main.py file;

    • comment the code blocks of parameter settings for MovieLens-20M;

    • uncomment the code blocks of parameter settings for Dianping-Food;

    • $ python main.py (settings for KGCN and KGCN-LS are different. Plase carefully choose the corresponding code blocks in main.py)
      

kgcn's People

Contributors

hwwang55 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.