Code Monkey home page Code Monkey logo

kgcn-pytorch's Introduction

KGCN-pytorch

This is the Pytorch implementation of KGCN (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)

Dataset

  • Movie

    Raw rating file for movie is too large to be contained in this repo.

    Downlad the rating data first

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

    Nothing to do

  • Other dataset

    If you want to use your own dataset, you need to prepare 2 data.

    1. Rating data
      • Each row should contain (user-item-rating)
      • In this repo, it is pandas dataframe structure. (look at data_loader.py)
    2. Knowledge graph
      • Each triple(head-relation-tail) consists of knowledge graph
      • In this repo, it is dictionary type. (look at data_loader.py)

Structure

  1. data_loader.py

    • data loader class for movie / music dataset
    • you don't need it if you make custom dataset
  2. aggregator.py

    • aggregator class which implements 3 aggregation functions
  3. model.py

    • KGCN model network

Running the code

Look at the KGCN.ipynb.

It contains

  • how to construct Datset
  • how to construct Data loader
  • how to train network

kgcn-pytorch's People

Contributors

zzaebok 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.