This is the source code for the Paper: Enhancing Session-based Recommendation with Contrastive Learning from Intent and Attribute Views by Exploring Substitutable and Complementary Relations.
- Python 3.9
- PyTorch 1.12
- Tmall: alpha=0.02, beta=100, num_coarse_sampling=90
- E-Commerce (CIKM19): alpha=0.02, beta=150, num_coarse_sampling=90
- Cosmetics: alpha=0.02, beta=100, num_coarse_sampling=90
- For Tmall and E-Commerce(CIKM19):
python main.py --dataset Tmall --alpha 0.02 --beta 100
python main.py --dataset CIKM19 --alpha 0.02 --beta 150
- For Cosmetics:
python main_cosmetics.py --dataset Cosmetics --alpha 0.02 --beta 100
The datasets have been preprocessed and encoded with pickle, which can be downloaded from the link (password: v3bj)