Giter Club home page Giter Club logo

nncf's Introduction

NNCF

Introduction

This repository contains code for paper "On Sampling Strategies for Neural Network-based Collaborative Filtering", which propose (1) a general NNCF framework incorporates both interaction and content information, and (2) sampling strategies for speed up the process.

Model parameters

Loss Functions

  • pointwise: loss=skip-gram, mse
  • pairwise: loss=log-loss, max-margin

Content Embedding

  • CNN: model_choice=cnn_embedding
  • RNN: model_choice=rnn_embedding
  • Mean of word vectors: model_choice=basic_embedding

Interaction Module

  • dot product

Sampling strategies

  • IID sampling: train_scheme=presample + shuffle_st=random

  • Negative sampling: train_scheme=original

  • Stratified sampling: train_scheme=group_sample + shuffle_st=item

  • Negative sharing: train_scheme=neg_shared

  • Stratified sampling with negative sharing: train_scheme=group_neg_shared

Other parameters explained

  • eval_scheme: whole@k for using all test items as candidates, given@-1 for using true items + random sampled 10 items as candidates.

  • neg_loss_weight & gamma: adjustment in functions

  • chop_size: number of positive links per item in a batch. Only approximately when set group_shuffling_trick=True (which is recommended).

Setup and Run

  1. unzip data in ./data folder, and go to ./code/sampler, execute ./make.sh
  2. run using scripts under ./code/scripts/demos, which are prepared for each of the sampling strategies.
  3. after running, the results are stored in ./results folder

Requirements

  1. Unix system with python 2.7, GCC 4.8.x and GSL
  2. Keras 1.2.2
  3. Tensorflow 1.0

The code may or may not be working properly with other versions.

Tips

  • GSL can be installed with sudo apt-get install libgsl-dev
  • Keras can be installed by first downloading zip file of version 1.2.2 and then installing with command python setup.py install

Cite

@inproceedings{chen2017onsampling,
	title={On Sampling Strategies for Neural Network-based Collaborative Filtering},
	author={Chen, Ting and Sun, Yizhou and Shi, Yue and Hong, Liangjie},
	booktitle={Proceedings of the 23th ACM SIGKDD international conference on Knowledge discovery and data mining},
	year={2017},
	organization={ACM}
}

nncf's People

Contributors

chentingpc avatar

Watchers

James Cloos avatar 谢伟浩 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.