Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Shiying 2895368c8f | 8 months ago | |
---|---|---|
best_model | 1 year ago | |
data/taobao | 1 year ago | |
README.md | 8 months ago | |
configs.py | 1 year ago | |
model.py | 1 year ago | |
module.py | 1 year ago | |
requirements.txt | 2 years ago | |
train.py | 1 year ago | |
utils.py | 1 year ago |
This is the TensorFlow 2 implementation for the paper:
An Intention-aware Markov Chain based Method for Top-K Recommendation (link)
Run
pip install -r requirements.txt
It is a sample with around 500,000 interactions from the Taobao dataset (link). The dataset will be automatically generated for the first time you train the model. For preprocessing details, see utils.py
.
To train our model in the Taobao-500K dataset, please run
python train.py --dataset taobao --mode train_500K --model IMRec
Experimental settings are defined in config.py
. For easy use, some of the settings can be overwritten by passing command-line arguments. For example, to set the embedding dimension as 50, run
python train.py --dataset taobao --mode train_500K --model IMRec --embed_dim 50
The model is evaluated on the test datasets automatically at the end of each epoch. Check the experimental results in the log
folder.
Some key arguments:
embed_dim
: the embedding dimension
maxlen
: the max length of interaction sequence
att_len
: the order of the Markov chain
alpha
: the long-term and short-term preference weighting factor
without_il
: whether to disable the intention loss module
bpr
: whether to use BPR loss
time_threshold
: the time threshold of strict short-term definition. 0 for not setting the threshold
item_intention
: whether to use (item, action) as intention
We provide the best model of the Taobao-500K dataset. To load the model, run:
python train.py --dataset taobao --mode train_500K --model IMRec --weights_dir ./best_model/best_epoch.ckpt
If you want to save checkpoints when training, run:
python train.py --dataset taobao --mode train_500K --model IMRec --save_weights 1
An Intention aware Markov Chain based Method for Top-K Recommendation-Tensorflow2 Implementation
CSV other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》