No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 652ca40 Jul 26, 2018
Permalink
Failed to load latest commit information.
FM.py Initial commit Jul 26, 2018
HRM_FM.py Initial commit Jul 26, 2018
PRME_FM.py Initial commit Jul 26, 2018
README.md Update README Jul 26, 2018
TransFM.py Initial commit Jul 26, 2018
dataset.py Initial commit Jul 26, 2018
main.py Initial commit Jul 26, 2018

README.md

TransFM

This repository contains an implementation of TransFM, as described in paper "Translation-based Factorization Machines for Sequential Recommendation".

This repository also includes implementations of vanilla FMs, as well as the proposed PRME-FM and HRM-FM 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