Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
/ sops-sasrec Public archive

Sequence or Pseudo-Sequence? An Analysis of Sequential Recommendation Datasets

License

Notifications You must be signed in to change notification settings

VodyTV/sops-sasrec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequence or Pseudo-Sequence?

An Analysis of Sequential Recommendation Datasets

header_sequence_image

This repo contains our re-implementation and extension of SASRec [1] as well as code to download, process and format the datasets we use in our paper.

In order to get the data, run the notebook and processed datasets will be saved into a data/ directory.

This code a rebuild of this repo https://github.com/kang205/SASRec

Paper

Link to paper

Teaser Video

How to Run

Install the requirements.

Run the notebook to download and process the datasets.

In the environment, run the experiments with the commands below.

Params

Param Description Example
--f-name File name of interaction dataset ml-1m
--shuffle-sequence Whether to shuffle the input sequences True or False
--batch-size Batch size 1024
--lr Learning Rate 0.001
--maxlen Maximum length of sequences 200
--hidden-dim Hidden Dimension 100
--num-blocks Number of attention blocks 2
--num-epochs Number of epochs 200
--num-heads Number of heads 2
--dropout-rate Dropout Rate 0.2
--seed Random Seed 123
--output-metrics-path Path to save results 'results/experiment_results.txt'

Shuffled / Unshuffled Experiments

python -m sas_rec.experiment --f-name 'ml_1m' --shuffle-sequence False --batch-size 128 --seed 101 --num-epochs 1 --output-metrics-path 'results/experiment_results.txt'

Rating Experiments

Modified Experiments

python -m sas_rec.modified_experiment --f-name 'ml_1m_rating' --shuffle-sequence False --batch-size 128 --seed 101 --num-epochs 1 --output-metrics-path 'results/experiment_results.txt'

Joint loss experiment on movielens

python -m sas_rec.joint_loss_experiment --f-name 'ml-1m-rating' --shuffle-sequence False --batch-size 128 --seed 101 --num-epochs 20 --output-metrics-path 'results/experiment_results.txt'

References

[1] SASRec https://arxiv.org/abs/1808.09781

About

Sequence or Pseudo-Sequence? An Analysis of Sequential Recommendation Datasets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •