GithubHelp home page GithubHelp logo

sandy4321 / fmg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hkust-knowcomp/fmg

0.0 1.0 0.0 65.94 MB

KDD17_FMG

Python 18.91% M 0.31% MATLAB 33.34% C 3.11% Fortran 31.47% Makefile 0.23% C++ 11.65% Objective-C 0.97%

fmg's Introduction

FMG

The code KDD17 paper "Meta-Graph Based Recommendation Fusion over Heterogeneous Information Networks" and extended journal version "Learning with Heterogeneous Side Information Fusion for Recommender Systems"

Readers are welcomed to fork this repository to reproduce the experiments and follow our work. Please kindly cite our paper

@inproceedings{zhao2017meta,
title={Meta-Graph Based Recommendation Fusion over Heterogeneous Information Networks},
author={Zhao, Huan and Yao, Quanming and Li, Jianda and Song, Yangqiu and Lee, Dik Lun},
booktitle={KDD},
pages={635--644},
year={2017}
}

@TechnicalReport{zhao2018learning,
title={Learning with Heterogeneous Side Information Fusion for Recommender Systems},
author={Zhao, Huan and Yao, Quanming and Song, Yangqiu and Kwok, James and Lee, Dik Lun},
institution = {arXiv preprint arXiv:1801.02411},
year={2018}
}

We released related datasets: yelp-200k, amazon-200k, yelp-50k and amazon-50k. Any problems, you can create an issue. Note that the amazon dataset is provied by Prof. Julian McAuley, thus if you use this dataset for your paper, please cite the authors' paper as instructed in the website http://jmcauley.ucsd.edu/data/amazon/

Instructions

For the sake of ease, a quick instruction is given for readers to reproduce the whole process on yelp-50k dataset. Note that the programs are testd on Linux(CentOS release 6.9), Python 2.7 and Numpy 1.14.0 from Anaconda 4.3.6.

Prerequisites

  1. Unzip the file FMG_released_data.zip, and create a directory "data" in this project directory.
  2. Move yelp-50k and amazon-50k into the "data" directory, then iteratively create directories "sim_res/path_count" and "mf_features/path_count" in directory "data/yelp-50k/exp_split/1/".
  3. Create directory "log" in the project by "mkdir log".
  4. Create directory "fm_res" in the project by "mkdir fm_res".

Meta-graph Similarity Matrices Computation.

To generate the similarity matrices on yelp-50k dataset, run

python 200k_commu_mat_computation.py yelp-50k all 1

The arguments are explained in the following:

yelp-50k: specify the dataset.
all: run for all pre-defined meta-graphs.
1: run for the split dataset 1, i.e., exp_split/1

One dependent lib is bottleneck, you may install it with "pip install bottleneck".

Meta-graph Latent Features Generation.

To generate the latent features by MF based on the simiarity matrices, run

python mf_features_generator.py yelp-50k all 1

The arguments are the same as the above ones.

Note that, to improve the computation efficiency, some modules are implements with C and called in python(see load_lib method in mf.py). Thus to successfully run mf_features_generator.py, you need to compile two C source files. The following scripts are tested on CentOS, and readers may take as references.

gcc -fPIC --shared setVal.c -o setVal.so
gcc -fPIC --shared partXY.c -o partXY.so

After the compiling, you will get two files in the project directory "setVal.so" and "partXY.so".

FMG

After obtain the latent features, then the readers can run FMG model as following:

python run_exp.py config/yelp-50k.yaml -reg 0.5

One may read the comment in files in directory config for more information.

Misc

If you have any questions about this project, you can open issues, thus it can help more people who are interested in this project. I will reply to your issues as soon as possible.

fmg's People

Contributors

hzhaoaf avatar quanmingyao 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.