Giter Site home page Giter Site logo

transfm's Introduction

TransFM

This repository contains an implementation of TransFM, as described in the paper:

Rajiv Pasricha, Julian McAuley, "Translation-based Factorization Machines for Sequential Recommendation", RecSys 2018.

This repository also includes implementations of vanilla FMs, as well as the proposed PRME-FM and HRM-FM models.

Please cite the paper above if you use or extend our models.

File formats

  • Input dataset

    • One example per line
    • <user_id> <item_id> <rating> <timestamp>
    • Values separated by a space
    • No header row
    • Example row: User_12 Item_65 5.0 1376697600
  • Item categories

    • CSV file, one item per line
    • Expected header: item_id,item_cat_seq
    • item_cat_seq: comma separated list of item category IDs, enclosed as a string.
    • Example row: 2643,"[165, 193, 442]"
  • User features

    • CSV file with numeric features, one user per line
    • Header row expected, first column should be named idx
  • Item features

    • CSV file with numeric features, one item per line
    • Header row expected, first column should be named idx
  • Geographical features

    • CSV file with numeric features, one item per line
    • Header row expected, first column should be named place_id

Example command

python main.py \
      --filename ratings_Automotive.txt.gz
      --model TransFM
      --features categories
      --features_file item_cat_seq_Automotive.csv.gz
      --max_iters 1000000
      --num_dims 10
      --linear_reg 10.0
      --emb_reg 1.0
      --trans_reg 0.1
      --init_mean 0.1
      --starting_lr 0.02
      --lr_decay_factor 1.0
      --lr_decay_freq 1000
      --eval_freq 50
      --quit_delta 1000

transfm's People

Contributors

rpasricha avatar macfarll 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.