Coder Social home page Coder Social logo

rootlu / sian Goto Github PK

View Code? Open in Web Editor NEW
30.0 2.0 12.0 94.9 MB

Code and data for ECML-PKDD paper "Social Influence Attentive Neural Network for Friend-Enhanced Recommendation"

Python 100.00%
social-recommendation wechat graph-neural-networks heterogeneous-graph-neural-network friend-enhanced-recommendation ecml-pkdd-paper

sian's Introduction

SIAN

Code and data for ECML-PKDD paper "Social Influence Attentive Neural Network for Friend-Enhanced Recommendation"

Requirements

  • Python 2.7
  • PyTorch 0.4.1
  • numpy
  • scipy
  • My machine with two GPUs (NVIDIA GTX-1080 *2) and two CPUs (Intel Xeon E5-2690 * 2)

Description

├── baselines  # baseline code
│   ├── Eval4Baselines.py

├── code  # Our Model: SIAN
│   ├── Attention.py  # attention layer
│   ├── DataUtil.py  # data loader 
│   ├── Evaluation.py  # model evaluation
│   ├── FeatureAgg.py  # attentive feature aggregator 
│   ├── Fusion.py  # feature fusion layer 
│   ├── HeteInf.py  # the main class for SIAN
│   ├── InfluenceProp.py  # social influence coupler 
│   ├── Logging.py  #log

│   └── trainHeteInf.py  # the main function for SIAN
└── data  # dataset
    ├── Data4Baselines.ipynb  #
    ├── DataProcessor.ipynb
    ├── ItemProfileEmbed.ipynb
    ├── WechatTencent.ipynb
    ├── wxt  # FWD dataset 
    │   ├── biz2id
    │   ├── biz_profile.npy
    │   ├── item2id
    │   ├── item_profile.npy
    │   ├── user2id
    │   ├── user_profile.npy
    │   ├── wxt.att.analysis
    │   ├── wxt.interaction.graph
    │   ├── wxt.item.biz
    │   ├── wxt.social.graph
    │   ├── wxt.test.rating.712
    │   ├── wxt.train.rating.712
    │   ├── wxt.user.biz
    │   └── wxt.val.rating.712
    ├── wxt.ipynb
    ├── yelp  # yelp dataset
    │   ├── item_profile.npy
    │   ├── user_profile.npy
    │   ├── yelp.att.analysis
    │   ├── yelp.interaction.graph
    │   ├── yelp.social.graph
    │   ├── yelp.test.rating.712
    │   ├── yelp.train.rating.712
    │   └── yelp.val.rating.712
    ├── yelp.ipynb


├── log  # saved log file
│   ├── wxt.0.0.6023.0.35225.model

Dataset

FWD dataset (i.e., wxt data) can be downloaded from Google Drive and BaiduYun (提取码:i6qy)

Reproducing results in the paper

Load the saved models in log/ dir.

Training

python trainHeteInf.py  --help

Reference

@inproceedings{Yuanfu2020SIAN,
  title={Social Influence Attentive Neural Network for Friend-Enhanced Recommendation},
  author={Yuanfu Lu, Ruobing Xie, Chuan Shi, Yuan Fang, Wei Zhang, Xu Zhang, Leyu Lin.}
  booktitle={Proceedings of ECML-PKDD},
  year={2020}
}

sian's People

Contributors

rootlu 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

Watchers

 avatar  avatar

sian's Issues

Error in Using wxt dataset

2020.07.19-15:25:05
Namespace(batch_size=1024, biz_profile='biz_profile.npy', dataset_name='wxt', emb_size=64, epochs=100, eval_num=100, inf_flag=True, item_num=7900, item_profile='item_profile.npy', lr=0.0001, on_YARD=False, profile_size=150, save_model=True, seed=72, test_batch_size=1024, top_k=10, use_cuda=False, user_num=8163, user_profile='user_profile.npy', weight_decay=0.0005, worker_num=0)
Using cuda...
Loading data...
--- # interaction links: 2465675, social links: 8639884.0, #u_bizs: 71983, i_bizs:22218
--- #train size:1725973 #user:25049, #item:22218
--- #valid size:246568 #user:13424, #item:8075
--- #test size:493134 #user:16659, #item:11511
Load data finished 19.68671464920044s
Initializing model...
Traceback (most recent call last):
File "./SIAN/code/trainHeteInf.py", line 486, in
main(args)
File "./SIAN/code/trainHeteInf.py", line 271, in main
item_num=args.item_num, biz_num=args.biz_num,
AttributeError: 'Namespace' object has no attribute 'biz_num'

May I know what the correct value of biz_num is?

Will Douban dataset be released?

I have run experiments on Yelp dataset and found the result in the paper is reproducible. I wonder if the Douban dataset could be made public so that a more comprehensive analysis can be done on the proposed model.

请问yelp数据集里的act列是什么id呢?

看代码里有 user_id \t item_id \t label \t act_list 这样的注释,act_list 表示的是 user 的所有好友吗?
注意到同一个user_id,其act_list 并不等长,但同一user的多个样本中,短act_list 总是长act_list 的子集,这里是为什么吗?是因为数据集处理是根据rating时间以及建立好友时间来做的,rating之后建立的好友关系并未放入模型训练是吗?

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.