Coder Social home page Coder Social logo

linhthi / ts Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 34 MB

Codebase for paper: "Improving GCN with Transformer layer in social-based items recommendation"

Python 77.71% Jupyter Notebook 22.29%
graph-neural-networks transformer graph-convolutional-networks graph-transformer recommendations

ts's Introduction

Python Implementation of Rec-Sys Algorithm

The dataset is a copy of the Epinions and Ciao dataset in the <https://www.cse.msu.edu/~tangjili/datasetcode/truststudy.htm>

Train model

run script below, params are default you can change on main.py to setup model for explore model:

PMF/NeuMF

python main.py --model=<name_model> --dataset=<datasetname>
example:
python main.py --model=PMF --dataset=ciao

GraphREC

python main_graphrec.py --data=data/ciao

GCN

python main_gcn.py --dataset=ciao --epochs=100

GTN

python main_gtn --dataset=ciao

Result

We use 60/20/20 for training, validation, test set

PMF

learning_rate k_dim RMSE MAE
0.001 16 1.05318 0.81547
0.005 16 1.05399 0.81527
0.01 16 1.05903 0.81657
0.05 16 1.06514 0.82039
0.05 8 1.06159 0.82062
0.01 8 1.06556 0.82129
0.005 8 1.05626 0.81623

NeuMF

GraphRec

GTN

Ciao Dataset

Model RMSE MAE
PMF 1.0581 0.8184
NeuMF 1.0439 0.8052
GraphRec 1.0090 0.7834
GCN 1.0605 0.8270
GTN 0.9732 0.7641

Epinions Dataset

Model RMSE MAE
PMF 1.1829 0.9713
NeuMF 1.1411 0.9072
GraphRec 1.1078 0.8524
GCN 1.1680 0.8956
GTN 1.0139 0.8436

Reference:

PMF:

  1. Mnih, A., & Salakhutdinov, R. (2007). Probabilistic matrix factorization. In Advances in neural information processing systems (pp. 1257-1264).
  2. Salakhutdinov, R. Probabilistic matrix factorization in Matlab.

NeuMF:

  1. Neural Collaborative Filtering at WWW'17

GraphRec

  1. Graph Neural Networks for Social Recommendation (WWW'19).

GCN

  1. Graph Convolutional Network

GTN (Graph Convolutional Network add Transformer Encoder layer)

  1. Attention is all you need

ts's People

Contributors

linhthi avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.