Giter Site home page Giter Site logo

js05212 / cdl Goto Github PK

View Code? Open in Web Editor NEW
70.0 5.0 20.0 9.6 MB

Official Code for 'Collaborative Deep Learning for Recommender Systems' - SIGKDD

Home Page: http://wanghao.in/CDL.htm

MATLAB 20.15% Makefile 0.18% C++ 8.78% C 1.11% Jupyter Notebook 69.78%

cdl's Introduction

This is the official code for CDL (collaborative deep learning). More details on models are results can be found in this blog post. It consists of two parts: a matlab component and a C++ component.

To run this code you need to make sure:

  1. you have the mult_nor.mat file located in cdl-release/example (can be downloaded from www.wanghao.in/code/cdl-release.rar)
  2. you have matlab with GPU support
  3. you have installed the GSL library (see www.gnu.org/software/gsl/)

After installing GSL, please remember to add the path of the dynamic library (the directory with files like libgsl.so.0.10.0) to LD_LIBRARY_PATH in your .bashrc. Or you can directly change the code in cdl.m around Line 586 where LD_LIBRARY_PATH is exported.

To save the pain of handling memory and variables in mex, we directly compiled a C++ program for the updates of U and V and call the program from matlab. If your program runs without trouble, congratulations! If not, you may have to re-compiled the C++ component which is in the folder 'ctr-part'. You will need to install the GSL before doing that.

To quickly run the program you can directly call the cdl_main.m.

To quickly know what CDL is doing click on collaborative-dl.ipynb (demo in this notenook uses the MXNet-version code, not this matlab/C++ version).

MXNet version for simplified CDL: https://github.com/js05212/MXNet-for-CDL.

Data: https://www.wanghao.in/data/ctrsr_datasets.rar.

Slides: http://wanghao.in/slides/CDL_slides.pdf and http://wanghao.in/slides/CDL_slides_long.pdf.

Other implementations (third-party):

PyTorch code by Zach Langley.

Tensorflow code by gtshs2.

Keras code by zoujun123.

Python code by xiaoouzhang.

Reference:

Collaborative Deep Learning for Recommender Systems

@inproceedings{DBLP:conf/kdd/WangWY15,
  author    = {Hao Wang and
               Naiyan Wang and
               Dit{-}Yan Yeung},
  title     = {Collaborative Deep Learning for Recommender Systems},
  booktitle = {SIGKDD},
  pages     = {1235--1244},
  year      = {2015}
}


cdl's People

Contributors

js05212 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  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  avatar  avatar  avatar

cdl's Issues

Question about the process calculate MAP and Recall scores

Hi,
For the dataset CiteUlike-a, when we use the training set with P = 10 (dense setting).
In the file "cf-train-1-users.dat", we have some users with no relevant items (the number of relevant items = 0, about 412 users).
For this case, when calculating the Map or Recall score, we have to divide by the number of users. What is the number of users that the paper chooses? (num_u = 5551 or num_u = 5551 - 412)

Thank you very much!

A question about P

When P=1, how is feature vector of this user trained, won't it be unchanged?

Reproduce the results of the paper: Collaborative Deep learning for Recommender Systems

Hi @js05212,

I tried to reproduce the results in your paper, but the results are not expected.
For citeulike-a dataset, sparse setting, I get the results like this:
M = 50, 100, 150, 200, 250, 300
50: 0.114028
100: 0.166543
150: 0.204587
200: 0.233036
250: 0.256955
300: 0.276866
I compare this result with Figure-4 in your paper, it worse than.
Can you describe how you get the results in the paper? After training process, what steps you do?

error while import data

ImportError Traceback (most recent call last)
in ()
2 import numpy as np
3 import logging
----> 4 import data
5 from math import sqrt
6 from autoencoder import AutoEncoderModel

ImportError: No module named data

Reproduce Error

Hi,
I have faced this problem for several days, and never solved. Could you please tell me the matlab version you used, If you can, please give me a hint to solve this problem.
Error using gpuArray/hTimesTranspose
Call to sgemm in CUBLAS failed with error status: CUBLAS_STATUS_EXECUTION_FAILED.

Error in cdl (line 212)
h0d{l} = bsxfun(@plus, h0d{l+1} * S.W{l}', S.biases{l}');

Error in cdl_worker (line 255)
S = cdl (S, X, X_valid, X_ori, 0.1,my,perm_idx);

Error in cdl_main (line 16)
cdl_worker(para_gpuDevice,para_layers,para_blayers,...
Thanks.

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.