GithubHelp home page GithubHelp logo

ckan's Introduction

CKAN

This repository is the implementation of CKAN :

CKAN: Collaborative Knowledge-aware Attentive Network for Recommender Systems,SIGIR 2020

Ze Wang, Guangyan Lin, Huobin Tan, Qinghong Chen, and Xiyang Liu

Required packages

The code has been tested running under Python 3.6.9, with the following packages installed (along with their dependencies):

  • torch==1.3.0
  • torchvision==0.4.1
  • numpy==1.17.3
  • scikit-learn==0.21.3

Files in the folder

  • data/
    • music/
      • user_artists.dat: raw rating file of Last.FM dataset;
      • kg.txt: knowledge graph file;
      • item_index2entity_id.txt: the mapping from item indices in the raw rating file to entity IDs in the KG;
    • book/ ( the structure of other datasets is similar )
    • movie/
    • restaurant/
  • src/: implementations of CKAN.

Perpare & preprocess data

We have prepared processed data in music and book . You can skip this step and proceed directly to the next step. But for larger dataset ( movie and restaurant ), you need to download and preprocess yourself by following the steps below:

  • Music
$ wget http://files.grouplens.org/datasets/hetrec2011/hetrec2011-lastfm-2k.zip
$ unzip hetrec2011-lastfm-2k.zip
$ mv hetrec2011-lastfm-2k/user_artists.dat data/music/
$ cd src
$ python preprocess.py --dataset music
$ python main.py
  • Book
$ wget http://www2.informatik.uni-freiburg.de/~cziegler/BX/BX-CSV-Dump.zip
$ unzip BX-CSV-Dump.zip
$ mv BX-CSV-Dump/BX-Book-Ratings.csv data/book/
$ cd src
$ python preprocess.py --dataset book
  • movie
$ 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
  • Restaurant
$ wget https://github.com/hwwang55/KGNN-LS/raw/master/data/restaurant/Dianping-Food.zip
$ unzip Dianping-Food.zip
$ mv Dianping-Food/ data/restaurant

Run the code

We set a random seed to facilitate users to observe the effect of the model easily. You can reset the random seed by adding parameters this way: --random_flag True

  • music
$ cd src
$ python main.py --dataset music (note: use -h to check optional arguments)
  • book
$ cd src
$ python main.py --dataset book --n_layer 2 --user_triple_set_size 16
  • movie
$ cd src
$ python main.py --dataset movie --n_layer 1 --user_triple_set_size 32
  • restaurant
$ cd src
$ python main.py --dataset restaurant --n_layer 1 --user_triple_set_size 16

ckan's People

Contributors

weberrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ckan's Issues

Hyper-paraments for MovieLens-20M

Hi,I have a problem while reproduce the result of the paper.With the hyper-parameter seting in the readme, I can't reproduce the result of MovieLens-20M, chould you please provide a hyper-parameter seting for MovieLens-20M in detail?

Problem of reproducing baseline model

Hi author,

Thanks for your wonderful work! I have a small problem when I try to reproduce the result of RippleNet and KGNN-LS, it gets undesirable results on Last.FM with author's source code.

Could you kindly give me some hints about how you train RippleNet and the hyperparameters used in those datasets?

Much appreciate!

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.