Skip to content

alarca94/sequer-recsys23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEQUER (SEQuence-Aware Explainable Recommendation)

This is our Pytorch implementation of the paper:

Ariza-Casabona, A., Salamó, M., Boratto, L., Fenu, G. (2023). Towards Self-Explaining Sequence-Aware Recommendation. In Proceedings of the 17th ACM Conference on Recommender Systems (RecSys '23). Association for Computing Machinery, New York, NY, USA, 904–911. https://doi.org/10.1145/3604915.3608847

Please cite our paper if you use this repository.

Datasets

  • Amazon Beauty
  • Amazon Sports
  • Amazon Toys
  • Yelp

The preprocessed and filtered datasets are taken from the P5 github repository. For those interested in the original Amazon and Yelp datasets, refer to the lei's Sentires-Guide on how to extract feature explanation quadruples.

In order to be able to use P5's datasets, they must be processed by process_data.py which converts them to our dataset format and performs a user temporal split: python3 process_data.py

Usage

  1. Update utils/constants.py file with the BASE_PATH to store the data, results and checkpoint folders
  2. Update scripts/sequer.sh with the --model-suffix corresponding to the configuration file you want to use. By default, this script runs the code on each dataset with 5 different seeds on a CUDA device.
  3. Give necessary permissions to the script file: chmod +x scripts/sequer.sh
  4. Run in background: nohup ./scripts/sequer.sh > sequer_log.txt &

In case you want to run a single experiment: python3 main.py --model-name ${model} --model-suffix=${suffix} --dataset ${dataset} --fold 0 --seed ${seed} --cuda --log-to-file

Additional arguments include: --test (to select a small subset of the training set for quick code debugging), --no-generate (to avoid generating the file with the predicted explanations), --load-checkpoint to evaluate the last generated checkpoint for that model configuration.

Dependencies

The necessary Python packages required to run our code are:

- torch==1.8.1
- pandas==1.1.5
- numpy==1.18.0
- pickle5 (For Python 3.7 or lower)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors