Skip to content
The implementation of "Correlation-Sensitive Next-Basket Recommendation"", published in IJCAI'19
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

The implementation of Beacon in the "Correlation-Sensitive Next-Basket Recommendation" paper (IJCAI'19)

  1. Input format(s): Train/Validate/Test sets have the same format
  • For each basket sequence, baskets {b_i} are separated by '|', e.g., b_1|b_2|b_3|...|b_n

  • For each basket b_i, items {v_j} are separated by a space ' ', e.g., v_1 v_2 v_3 ... v_m

  1. How to train:
  • Step 1: Generate pre-computed correlation matrix C using
    • The 'nbhop' parameter is to generate the Nth-order correlation matrix
    • The default output directory is "data_dir/adj_matrix"
  • Step 2: Train the Beacon model using ".
    • Support 3 modes: train_mode, prediction_mode, tune_mode
    • The format of the prediction file is as follows: Target:gt_basket|item_candidate_1:score_1|item_candidate_2:score_2|
  1. If you find the code useful in your research, please cite:
  title={Correlation-Sensitive Next-Basket Recommendation},
  author={Le, Duc-Trong, Lauw, Hady W and Fang, Yuan},
  booktitle={Proceedings of the International Joint Conference on Artificial Intelligence},


  • Python == 3.6
  • Tensorflow == 1.14
  • scipy.sparse == 1.3.0

@Please drop me an email (ductrong.le.2014 at if you need any clarification. Thanks 👍

You can’t perform that action at this time.