Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CRIPAC-DIG/DGCF
[ICDM 2020] Python implementation for "Dynamic Graph Collaborative Filtering."
https://github.com/CRIPAC-DIG/DGCF
collaborative-filtering dynamic-graphs recommender-system
Last synced: 3 months ago
JSON representation
[ICDM 2020] Python implementation for "Dynamic Graph Collaborative Filtering."
- Host: GitHub
- URL: https://github.com/CRIPAC-DIG/DGCF
- Owner: CRIPAC-DIG
- Created: 2020-09-22T01:18:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T09:16:23.000Z (7 months ago)
- Last Synced: 2024-06-24T05:53:55.007Z (5 months ago)
- Topics: collaborative-filtering, dynamic-graphs, recommender-system
- Language: Python
- Homepage:
- Size: 334 KB
- Stars: 40
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- StarryDivineSky - CRIPAC-DIG/DGCF
README
# DGCF
This is the code for the ICDM 2020 Paper: [Dynamic Graph Collaborative Filtering](https://ieeexplore.ieee.org/abstract/document/9338436).
## Usage
Our code mainly mainly refers to jodie: https://github.com/srijankr/jodie/, data download method, running environment and initialization are the same as jodie.
### Train model
To train the DGCF model using the ```data/.csv``` dataset, use the following command. This will save a model for every epoch in the ```saved_models//``` directory.```python DGCF.py --network --model DGCF --epochs 50 --method attention --adj ```
This code can be given the following command-line arguments:
```--network:``` choose to the train data:```reddit\wikipedia\lastfm```
```--model:``` this is the name of the model
```--epochs:``` this is the maximum number of interactions to train the model.
```--embedding_dim:``` this is the number of dimensions of the dynamic embedding.
```--method:``` this is the type of aggregator function in second-order aggregation
```--adj:``` this is a boolean input indicating if use the second update.
```--length:``` this is the aggregator size in second-order aggegator function.
### Evaluate the model
To evaluate the performance of the interaction prediction task in one epoch, use the following command:
```python evaluate_interaction_prediction.py --network --model --method ```
To evaluate the performance of the interaction prediction task in all epoch, user the followinig command:
```python evaluate_all.py --network --model --method```
For detailed code execution, you can refer to the command line in the ```./Shell``` folder.
## Requirements
- python3
- jsonlines
- pytorch
- torch-geometric## Citation
Please cite our paper if you use the code:
```
@inproceedings{li2020dynamic,
title={Dynamic graph collaborative filtering},
author={Li, Xiaohan and Zhang, Mengqi and Wu, Shu and Liu, Zheng and Wang, Liang and Philip, S Yu},
booktitle={2020 IEEE International Conference on Data Mining (ICDM)},
pages={322--331},
year={2020},
organization={IEEE}
}
```