Coder Social home page Coder Social logo

neuacf's Introduction

NeuACF

This is an implementation of paper (Aspect-Level Deep Collaborative Filtering via Heterogeneous Information Networks).

Please refer our paper if you use this code and the bibtex of this paper is:

@inproceedings{han2018aspect,
   title={Aspect-Level Deep Collaborative Filtering via Heterogeneous Information Networks.},
   author="Han, Xiaotian and Shi, Chuan and Wang, Senzhang and Philip, S Yu and Song, Li",
   booktitle={IJCAI},
   pages={3393--3399},
   year={2018}
 }

Requirements

  • Python 3.6
  • Tensorflow 1.2.1
  • docopt 0.6.2
  • numpy 1.13.3
  • sklearn 0.18.1
  • pandas 0.20.1
  • scipy 1.0.0

How to Run

  1. unzip dataset.7z
  2. Compute the aspect-level similarity matrix with the matlab code
  3. Run the model with the python code acf.py

example:

 python ./acf.py ../dataset/amazon/ amovie --mat "U.UIU,I.IUI,U.UICIU,I.ICI" --epochs 40 --last_layer_size 64 --batch_size 1024 --num_of_neg 10 --learn_rate 0.00005 --num_of_layers 2 --mat_select median

Parameters

Parameter Note
--mat sim_mat [default: ""]
--epochs Embedding size [default: 40]
--last_layer_size The number of iterations [default: 64]
--num_of_layers The number of layers [default: 2]
--num_of_neg The number of negs [default: 2]
--learn_rate The learn_rate [default: 0.00005]
--batch_size batch_size [default: 1024]
--mat_select mat select type [default: median]
--merge batch_size [default: attention]

Link

For more information, visit the webpage http://www.shichuan.org

neuacf's People

Contributors

ahxt 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

Watchers

 avatar

neuacf's Issues

some error in code

Thanks for your code sincerely,but now there are some errors in the code you had shared,for example,no definition about len(mat_list)==4,maybe you delete some code.Can you upload or send the corre code?Because my senior Student Projec is based on your work!Thank you sincerely!!
This is my email:[email protected]

NameError

Hello,
Thank you for your work,when I run the code following your steps, I meet the following question, can you tell me how to solve the problem?
(NeuACF) F:\NeuACF\src>python ./acf.py ../dataset/amazon/ amovie --mat "U.UIU,I.IUI,U.UICIU,I.ICI" --epochs 40 --last_layer_size 64 --batch_size 1024 --num_of_neg 10 --learn_rate 0.00005 --num_of_layers 2 --mat_select median

--mat_select median

--mat U.UIU,I.IUI,U.UICIU,I.ICI

--last_layer_size 64

--epochs 40

--merge attention

--num_of_neg 10

--learn_rate 0.00005

--batch_size 1024

--num_of_layers 2

<dataset_dir> ../dataset/amazon/

amovie

U_feature1 shape: (6170, 6170)

I_feature1 shape: (2753, 2753)

Traceback (most recent call last):
File "./acf.py", line 109, in
U_feature2 = pd.read_csv( U_feature_dir2, sep=",", header=None ).fillna( 0 ).as_matrix()
NameError: name 'U_feature_dir2' is not defined

which file shoud be used ?

(.venv) mldl@ub1604:~/ub16_prj/NeuACF/src$ python3.6 ./acf.py ../dataset/amazon/ --mat "U.UIU,I.IUI,U.UITIU,I.ITI,U.UIVIU,I.IVI,U.UICIU,I.ICI" --epochs 40 --last_layer_size 64 --batch_size 1024 --num_of_neg 10 --learn_rate 0.00005 --num_of_layers 2 --mat_select median
/home/mldl/v_pub_py36/.venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/home/mldl/v_pub_py36/.venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
Usage:
acf.py [options] <dataset_dir>

(.venv) mldl@ub1604:/ub16_prj/NeuACF/src$ python3.6 ./acf.py ../dataset/amazon/amovie.train.rating --mat "U.UIU,I.IUI,U.UITIU,I.ITI,U.UIVIU,I.IVI,U.UICIU,I.ICI" --epochs 40 --last_layer_size 64 --batch_size 1024 --num_of_neg 10 --learn_rate 0.00005 --num_of_layers 2 --mat_select median
/home/mldl/v_pub_py36/.venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
/home/mldl/v_pub_py36/.venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
return f(*args, **kwds)
Usage:
acf.py [options] <dataset_dir>
(.venv) mldl@ub1604:
/ub16_prj/NeuACF/src$

How to run matlab code?

When I try to run matlab gen_PathSimMat_MUM_amovie.m, I got two errors.

Unable to read file 'amovie'. No such file or directory.
Undefined function or variable 'UI'.

Then, I create amovie folder and put training and testing files in it, but I got another error.

Unable to read file 'amovie'. No such file or directory.

So, I think maybe this amovie should be a file. But what should be in this file? What is the format of this file?
How can I solve the undefined variable 'UI' error?

关于相似矩阵计算

您好,我发现直接使用您提供的data文件(维度:n×2),确实会出现相似度矩阵为2×2的情况,不知道你是否先将data文件转换为邻接矩阵再进行相似度计算呢

about the movielens dataset

Thanks for your codes and data sincerely!And in your paper,the addtional information such as actors of movie is crawled from IMDB,would you mind to provide the movielens with it?

HR and NDCG

Hello, can you provide matlab code for HR and NDCG? thank you very much!

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.