Giter VIP home page Giter VIP logo

nnrec's Introduction

Source code for, AutoRec, an autoencoder based model for collaborative filtering. This package also includes implementation of RBM based collaborative filtering model(RBM-CF).

Dependencies

  • cython
  • progressbar
  • envoy
  • climin

Configuration

Models are defined in yaml configuration file. Configuration file consists of three sections

  • data: In this section, we define data sources and model save path
    • train : path of the training file
    • test : path of the test file
    • save : path for saving the model
  • param: In this section, we define network training parameters
    • lamda: list of regularization paramter per each layer
    • max_iter: maximum number of iteration
    • batch_size: size of the batch
    • optimizer: Choice of the optimizer (lbfgs, rprop, rmsprop)
    • reg_bias: whether to regularize bias or not
    • beta: sparsity control parameter
    • num_threads: maximum number of threads to be used while doing some of the matrix operations (set it to number of CPU cores)
  • layer: In this section, we define the network architecture. Layers are defined by layer index(starting from 1). Note that, layer index should be defined in ascending order (For eg: 1, 2, 3). Each layer is defined as
    • Layer index:
      • activation: Type of activation function (identity, sigmoid, relu, nrelu, tanh)
      • num_nodes: number of nodes in the given layer
      • type: layer type (input, hidden, output)
      • partial: whether the data in the given layer is partially observed or not (applicable only to input/output nodes)
      • binary : whether to enforce binary coding in the layer or not

Installation/Running

First, you will need to build the cython modules. Build cython modules by running

  • bash buildCython.sh

Running Autorec model

  • cd nn/autorec
  • PYTHONPATH=<NNRec_PATH> python learner.py -c <CONF_PATH>

Running RBMCF model

  • cd nn/cfrbm
  • PYTHONPATH=<NNRec_PATH> python learner.py -c <CONF_PATH>

Data

This program expects input in tab separated format.

For U-AutoRec:

  • <user>\t<item>\t<rating>

For I-AutoRec

  • <item>\t<user>\t<rating>

Contact

If you have any queries, please contact me at [email protected].

nnrec's People

Contributors

mesuvash 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.