Skip to content
View temproxrec's full-sized avatar

Block or report temproxrec

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
TemProxRec/README.md

TemproxRec (Temporal-Proximity-aware Recommendation model)

This repository provides PyTorch implementation of TemproxRec from the paper "Sequential Recommendation on Temporal Proximities with Contrastive Learning and Self-Attention"

Environment Setup

We test code with python 3.11.3 on ubuntu with cuda 11.4

Install the required packages into your python environment:

pip install -r requirements.txt

Trained Networks

The trained networks representing the best performances from our experiments for all datasets are available on our anonymous Google Drive

Their training scripts with optimal parameters are described in the 'run.sh'.

To reproduce the experiments, download all the folders and add them to the ./experiments/. Then, test the trained networks.

Experimental reproduction

For Training

Training TemproxRec is produced by using the main.py. For example, to train on Amazon 'beauty'

python main.py --dataset_code='beauty' --clip_time=128 --interval=60 --temperature=0.05 --lamb=0.3 --mode=train

The running scripts for the best experiment for all datasets are described in the 'run.sh'

For Testing Only

By changing the 'mode' to 'test_only' on the training code, the best model stored in the training stage can be tested.

python main.py --dataset_code='beauty' --clip_time=128 --interval=60 --temperature=0.05 --lamb=0.3 --mode=test_only

For Data Preparation

We experimeted with four dataset : Amazon Beauty, Video, Books, and Steam.

Preprocessed data for all are stored in ./Data/preprocessed. You can run the above training and test code with the preprocessed data.

Law data for Beauty and Video datasets are stored in ./Data/beauty and ./Data/video.

Due to capacity issues, the law data for Books and Steam datasets are available on our anonymous Google Drive.

Download the folder "books" and "steam" from the drive and add them to the TemproxRec's code in ./Data/.

Popular repositories Loading

  1. TemProxRec TemProxRec Public

    Python 4