{"id":13958333,"url":"https://github.com/CRIPAC-DIG/DGCF","last_synced_at":"2025-07-20T23:31:10.433Z","repository":{"id":113033503,"uuid":"297501057","full_name":"CRIPAC-DIG/DGCF","owner":"CRIPAC-DIG","description":"[ICDM 2020] Python implementation for \"Dynamic Graph Collaborative Filtering.\"","archived":false,"fork":false,"pushed_at":"2024-04-24T09:16:23.000Z","size":342,"stargazers_count":42,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-09T13:18:35.128Z","etag":null,"topics":["collaborative-filtering","dynamic-graphs","recommender-system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CRIPAC-DIG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-09-22T01:18:57.000Z","updated_at":"2024-08-01T21:24:56.000Z","dependencies_parsed_at":"2023-06-16T13:45:25.214Z","dependency_job_id":null,"html_url":"https://github.com/CRIPAC-DIG/DGCF","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CRIPAC-DIG%2FDGCF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CRIPAC-DIG%2FDGCF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CRIPAC-DIG%2FDGCF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CRIPAC-DIG%2FDGCF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CRIPAC-DIG","download_url":"https://codeload.github.com/CRIPAC-DIG/DGCF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226844984,"owners_count":17691138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collaborative-filtering","dynamic-graphs","recommender-system"],"created_at":"2024-08-08T13:01:29.774Z","updated_at":"2024-11-28T01:31:45.687Z","avatar_url":"https://github.com/CRIPAC-DIG.png","language":"Python","funding_links":[],"categories":["其他_推荐系统"],"sub_categories":["网络服务_其他"],"readme":"# DGCF\n\n\u003cimg src=\"dgcf.png\" alt=\"model\" style=\"zoom: 50%;\" /\u003e\n\nThis is the code for the ICDM 2020 Paper: [Dynamic Graph Collaborative Filtering](https://ieeexplore.ieee.org/abstract/document/9338436).\n\n## Usage\n\nOur code mainly mainly refers to jodie: https://github.com/srijankr/jodie/, data download method, running environment and initialization are the same as jodie.\n\n### Train model\nTo train the DGCF model using the ```data/\u003cnetwork\u003e.csv``` dataset, use the following command. This will save a model for every epoch in the ```saved_models/\u003cnetwork\u003e/``` directory.\n\n```python DGCF.py --network \u003cnetwork\u003e --model DGCF --epochs 50 --method attention  --adj  ```\n\nThis code can be given the following command-line arguments:\n\n```--network:``` choose to the train data:```reddit\\wikipedia\\lastfm```\n\n```--model:``` this is the name of the model  \n\n```--epochs:```  this is the maximum number of interactions to train the model.\n\n```--embedding_dim:``` this is the number of dimensions of the dynamic embedding.\n\n```--method:```  this is the type of aggregator function in second-order aggregation\n\n```--adj:```  this is a boolean input indicating if use the second update.\n\n```--length：``` this is  the aggregator size in second-order aggegator function.\n\n### Evaluate the model\n\nTo evaluate the performance of the interaction prediction task in one epoch, use the following command:\n\n```python  evaluate_interaction_prediction.py --network   --model  --method ```\n\nTo evaluate the performance of the interaction prediction task in all epoch, user the followinig command:\n\n```python  evaluate_all.py --network  --model --method```\n\nFor detailed code execution, you can refer to the command line in the ```./Shell``` folder.\n\n\n## Requirements\n\n- python3\n- jsonlines\n- pytorch\n- torch-geometric\n\n## Citation\n\nPlease cite our paper if you use the code:\n\n```\n@inproceedings{li2020dynamic,\n  title={Dynamic graph collaborative filtering},\n  author={Li, Xiaohan and Zhang, Mengqi and Wu, Shu and Liu, Zheng and Wang, Liang and Philip, S Yu},\n  booktitle={2020 IEEE International Conference on Data Mining (ICDM)},\n  pages={322--331},\n  year={2020},\n  organization={IEEE}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCRIPAC-DIG%2FDGCF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCRIPAC-DIG%2FDGCF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCRIPAC-DIG%2FDGCF/lists"}