A tensorflow implementation of the RecoGCN model in a CIKM'19 paper, titled with "Relation-Aware Graph Convolutional Networks for Agent-Initiated Social E-Commerce Recommendation".

Overview

This repo contains a tensorflow implementation of RecoGCN and the experiment dataset

Running the RecoGCN model

python train.py 

Example training output

Time elapsed = 6.89 mins, Training: loss = 389.51047, mrr = 0.63130, ndcg = 0.71369, hr1 = 0.50939, hr3 = 0.69945, hr5 = 0.78027, hr10 = 0.87522 | Val:loss = 2172.41870, mrr = 0.25467, ndcg = 0.40172, hr1 = 0.15110, hr3 = 0.25807, hr5 = 0.33136, hr10 = 0.45893

Example evaluation result

0	lr=0.0001,lamb=0.55,batch_size=400,numNegative=100,featEmbedDim=64,idenEmbedDim=64,outputDim=128,pathNum=7	Test loss:2033.5934; Test mrr:0.25339168; Test ndcg:0.3976466; Test hr1:0.14939758; Test hr3:0.2633283; Test hr5:0.34176204; Test hr10:0.46430722

These variant models below had been supported:

  • ReGCN
  • ReGCN_{MP}
  • RecoGCN

Dependencies (other versions may also work):

  • python == 3.6
  • tensorflow == 1.13.1
  • numpy == 1.16.3
  • h5py == 2.9.0
  • GPUtil ==1.4.0
  • setproctitle == 1.1.10

Dataset

You can download the experiment data from Here. An example loading code is provided as follow.

adj = {0:{}, 1:{}, 2:{}, 3:{}}
with h5py.File(dataset, 'r') as f:
	adj[0][1] = f['adj01'][:]
	adj[1][0] = f['adj10'][:]
	adj[0][2] = f['adj02'][:]
	adj[2][0] = f['adj20'][:]
	adj[0][3] = f['adj03'][:]
	adj[3][0] = f['adj30'][:]

	train_sample = f['train_sample'][:]
	val_sample = f['val_sample'][:]
	test_sample = f['test_sample'][:]
		
	item_freq = f['item_freq'][:]
	user_feature = f['user_feature'][:]
	agent_feature = f['agent_feature'][:]
	item_feature = f['item_feature'][:]

	userCnt = f['userCnt'][()]
	agentCnt = f['agentCnt'][()]
	itemCnt = f['itemCnt'][()]

The data structure is explained as follow.

adj[x][y] denotes the adjancy relationship from x to y. Here, 0 stands for user, 1 is selling agent, 2 and 3 are two kinds of items. The shape of adj[x][y] is [Num_of_node_x ,maximum_link]. Each line stores the node ids of type y who are linked with node x. Note that maximum_link should be the same for each of these relations.

train_sample, val_sample, test_sample are triplet of [user, selling_agent, item] pairs. Each type of node is encoded from 0.

item_freq is [item_id, item_frequency] matrix denotes the occur frequency of each item in train set.

user_feature, agent_feature, item_feature are three featrue matrix of shape [node_num, feature_num]. Here features for each node are multi-hot encoded, and different type of node can have different feature numbers.

Citation

If you use our code or dataset in your research, please cite:

@inproceedings{xu2019relation,
  title={Relation-aware graph convolutional networks for agent-initiated social e-commerce recommendation},
  author={Xu, Fengli and Lian, Jianxun and Han, Zhenyu and Li, Yong and Xu, Yujian and Xie, Xing},
  booktitle={Proceedings of the 28th ACM International Conference on Information and Knowledge Management},
  pages={529--538},
  year={2019}
}
Owner
xfl15
xfl15
A PyTorch implementation of "Say No to the Discrimination: Learning Fair Graph Neural Networks with Limited Sensitive Attribute Information" (WSDM 2021)

FairGNN A PyTorch implementation of "Say No to the Discrimination: Learning Fair Graph Neural Networks with Limited Sensitive Attribute Information" (

31 Jan 04, 2023
Collaborative variational bandwidth auto-encoder (VBAE) for recommender systems.

Collaborative Variational Bandwidth Auto-encoder The codes are associated with the following paper: Collaborative Variational Bandwidth Auto-encoder f

Yaochen Zhu 14 Dec 11, 2022
A Python scikit for building and analyzing recommender systems

Overview Surprise is a Python scikit for building and analyzing recommender systems that deal with explicit rating data. Surprise was designed with th

Nicolas Hug 5.7k Jan 01, 2023
A TensorFlow recommendation algorithm and framework in Python.

TensorRec A TensorFlow recommendation algorithm and framework in Python. NOTE: TensorRec is not under active development TensorRec will not be receivi

James Kirk 1.2k Jan 04, 2023
Bert4rec for news Recommendation

News-Recommendation-system-using-Bert4Rec-model Bert4rec for news Recommendation

saran pandian 2 Feb 04, 2022
This library intends to be a reference for recommendation engines in Python

Crab - A Python Library for Recommendation Engines

Marcel Caraciolo 85 Oct 04, 2021
Cross Domain Recommendation via Bi-directional Transfer Graph Collaborative Filtering Networks

Bi-TGCF Tensorflow Implementation of BiTGCF: Cross Domain Recommendation via Bi-directional Transfer Graph Collaborative Filtering Networks. in CIKM20

17 Nov 30, 2022
[ICDMW 2020] Code and dataset for "DGTN: Dual-channel Graph Transition Network for Session-based Recommendation"

DGTN: Dual-channel Graph Transition Network for Session-based Recommendation This repository contains PyTorch Implementation of ICDMW 2020 (NeuRec @ I

Yujia 25 Nov 17, 2022
A framework for large scale recommendation algorithms.

A framework for large scale recommendation algorithms.

Alibaba Group - PAI 880 Jan 03, 2023
基于个性化推荐的音乐播放系统

MusicPlayer 基于个性化推荐的音乐播放系统 Hi, 这是我在大四的时候做的毕设,现如今将该项目开源。 本项目是基于Python的tkinter和pygame所著。 该项目总体来说,代码比较烂(因为当时水平很菜)。 运行的话安装几个基本库就能跑,只不过里面的数据还没有上传至Github。 先

Cedric Niu 6 Nov 19, 2022
Spotify API Recommnder System

This project will access your last listened songs on Spotify using its API, then it will request the user to select 5 favorite songs in that list, on which the API will proceed to make 50 recommendat

Kevin Luke 1 Dec 14, 2021
Code for my ORSUM, ACM RecSys 2020, HeroGRAPH: A Heterogeneous Graph Framework for Multi-Target Cross-Domain Recommendation

HeroGRAPH Code for my ORSUM @ RecSys 2020, HeroGRAPH: A Heterogeneous Graph Framework for Multi-Target Cross-Domain Recommendation Paper, workshop pro

Qiang Cui 9 Sep 14, 2022
Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks

SR-HGNN ICDM-2020 《Global Context Enhanced Social Recommendation with Hierarchical Graph Neural Networks》 Environments python 3.8 pytorch-1.6 DGL 0.5.

xhc 9 Nov 12, 2022
An Efficient and Effective Framework for Session-based Social Recommendation

SEFrame This repository contains the code for the paper "An Efficient and Effective Framework for Session-based Social Recommendation". Requirements P

Tianwen CHEN 23 Oct 26, 2022
RecList is an open source library providing behavioral, "black-box" testing for recommender systems.

RecList is an open source library providing behavioral, "black-box" testing for recommender systems.

Jacopo Tagliabue 375 Dec 30, 2022
This is our implementation of GHCF: Graph Heterogeneous Collaborative Filtering (AAAI 2021)

GHCF This is our implementation of the paper: Chong Chen, Weizhi Ma, Min Zhang, Zhaowei Wang, Xiuqiang He, Chenyang Wang, Yiqun Liu and Shaoping Ma. 2

Chong Chen 53 Dec 05, 2022
Fast Python Collaborative Filtering for Implicit Feedback Datasets

Implicit Fast Python Collaborative Filtering for Implicit Datasets. This project provides fast Python implementations of several different popular rec

Ben Frederickson 3k Dec 31, 2022
Group-Buying Recommendation for Social E-Commerce

Group-Buying Recommendation for Social E-Commerce This is the official implementation of the paper Group-Buying Recommendation for Social E-Commerce (

Jun Zhang 37 Nov 28, 2022
A library of metrics for evaluating recommender systems

recmetrics A python library of evalulation metrics and diagnostic tools for recommender systems. **This library is activly maintained. My goal is to c

Claire Longo 458 Jan 06, 2023
Recommender systems are the systems that are designed to recommend things to the user based on many different factors

Recommender systems are the systems that are designed to recommend things to the user based on many different factors. The recommender system deals with a large volume of information present by filte

Happy N. Monday 3 Feb 15, 2022