Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
liushihai 19b31c0983 | 2 years ago | |
---|---|---|
.. | ||
conf | 2 years ago | |
data/yelp | 2 years ago | |
DataModule.py | 2 years ago | |
Metrics.py | 2 years ago | |
Parserconf.py | 2 years ago | |
README.md | 2 years ago | |
datahelper.py | 2 years ago | |
dataset.py | 2 years ago | |
eval.py | 2 years ago | |
train.py | 2 years ago | |
user_item_neg_dict.npy | 2 years ago |
[toc]
Diffnet++ model is a classical model in Social Recommendation area. This is an implementation of Diffnet++ as described in the DiffNet++: A Neural Influence and Interest Diffusion Network for Social Recommendation paper.
Diffnet++ model fuses both influence diffusion in the social network $G_S$ and interest diffusion in the interest network $G_I$ for social recommendation. The architecture of DiffNet++ contains four main parts: an embedding layer, a fusion layer, the influence and interest diffusion layers, and a rating prediction layer.
The Yelp dataset are used for model training and evaluation.
Yelp is a well-known on-line location based social network, where users could make friends with others and review restaurants.
Yelp dataset contains 204,448 ratings of 38,342 items by 17,237 users. We transform the original ratings to binary values. If the rating value is larger than 3, we transform it into 1, otherwise it equals 0. Each line of this file has the following format:
user_id item_id label
Hardware(GPU)
Framework
For more information, please check the resources below:
After installing MindSpore via the official website, you can start training and evaluation as follows:
python train.py
python eval.py
└── Diffnet_plus_plus
├── check_point
├── conf
├── yelp_Diffnet_plus_plus_ms.ini
├── data
├── datahelper.py
├── DataModule.py
├── dataset.py
├── eval.py
├── train.py
├── Metrics.py
├── ParserConf.py
├── README.md
python train.py
After training, you'll get some checkpoint files under the script folder by default. The loss value will be achieved as follows:
Epoch:1
Loss:66502.18
Epoch:2
Loss:66335.62
...
The model checkpoint will be saved in the current directory.
Before running the command below, please check the checkpoint path used for evaluation. Please set the checkpoint path to be the absolute full path, e.g., "./check_point/Diffnetplus_220.ckpt".
python eval.py
The above python command will run in the background. You can view the results on the screen. The accuracy of epoch 220 below is the best:
HR: 0.314 NDCG: 0.277
Parameters | GPU |
---|---|
Model Version | Diffnet++ |
Resource | GPU |
Uploaded Date | 1/9/2021 |
MindSpore Version | 1.2.1 |
Dataset | Yelp |
batch_size | Full batch |
Accuracy | HR: 0.314 NDCG: 0.277 |
There are three random situations:
Generating negative samples randomly.
Initialization of some model weights.
Please check the official homepage.
No Description
Unity3D Asset Jupyter Notebook Python Pickle Text 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》