Our fork used to reproduce Bert4Rec's results on Beauty, and provide better SASRec results by improving the loss function.
- git clone the aprec repo.
git clone https://github.com/asash/bert4rec_repro.git
-
follow its
README.md
to install relevant dependencies and test them. -
add our implement:
- Replace the
bce.py
file in thelosses/
folder with thebce.py
file we provided. - Replace the
negative_per_positive_target.py
file in therecommenders/dnn_sequential_recommender/target_builders/
folder with thenegative_per_positive_target.py
file we provided. - Add our
ml-1m-benchmark.py
file atevaluation/configs/bert4rec_repro_paper/
folder.
Run the command below at evaluation/
folder to get our experiment result of Table 3.
CHECK_COMMIT_STATUS=false sh run_n_experiments.sh configs/bert4rec_repro_paper/ml-1m_benchmark.py
Note if you want to replicate the BERT4Rec results on the Beauty datasets can follow the step bellow:
- Add
./beauty_s3.txt
todata/bert4rec/
folder. - Change 'datasets/bert4rec_datsets.py' file.
- Change 'datasets/datasets_register.py' file.
- Change the
DATASET
at config file 'ml-1m-benchmark.py' - Run command
CHECK_COMMIT_STATUS=false sh run_n_experiments.sh configs/bert4rec_repro_paper/ml-1m_benchmark.py