This is the official implementation of the paper "UniSAR: Modeling User Transition Behaviors between Search and Recommendation" based on PyTorch.
The main implementation of UniSAR can be found in the file models/UniSAR.py
.
All the hyper-parameter settings of UniSAR on both datasets can be found in files config/UniSAR_KuaiSAR.yaml
and config/UniSAR_Amazon.yaml
.
The settings of two datasets can be found in file utils/const.py
.
Download and unzip the processed data Amazon and KuaiSAR. Place data files in the folder data
.
The requirements can be found in file requirements.txt
.
Run codes in command line:
python3 main.py --model UniSAR --data KuaiSAR
After training, check log files, for example, output/KuaiSAR/logs/time.log
.
We conducted the experiments based on the following environments:
- CUDA Version: 11.4
- OS: CentOS Linux release 7.4.1708 (Core)
- GPU: The NVIDIA® 3090 GPU
- CPU: Intel(R) Xeon(R) Gold 6230R CPU @ 2.10GHz