{"id":13788763,"url":"https://github.com/hwwang55/MKR","last_synced_at":"2025-05-12T03:30:47.195Z","repository":{"id":59285552,"uuid":"144300024","full_name":"hwwang55/MKR","owner":"hwwang55","description":"A tensorflow implementation of MKR (Multi-task Learning for Knowledge Graph Enhanced Recommendation)","archived":false,"fork":false,"pushed_at":"2019-11-22T02:09:13.000Z","size":15001,"stargazers_count":322,"open_issues_count":8,"forks_count":110,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-18T02:38:54.920Z","etag":null,"topics":["knowledge-graph","multi-task-learning","recommender-systems"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwwang55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-10T15:00:02.000Z","updated_at":"2024-10-21T07:28:47.000Z","dependencies_parsed_at":"2022-09-16T21:40:10.922Z","dependency_job_id":null,"html_url":"https://github.com/hwwang55/MKR","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/hwwang55%2FMKR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwwang55%2FMKR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwwang55%2FMKR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwwang55%2FMKR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwwang55","download_url":"https://codeload.github.com/hwwang55/MKR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253667942,"owners_count":21944943,"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":["knowledge-graph","multi-task-learning","recommender-systems"],"created_at":"2024-08-03T21:00:53.098Z","updated_at":"2025-05-12T03:30:42.176Z","avatar_url":"https://github.com/hwwang55.png","language":"Python","funding_links":[],"categories":["TensorFlow Implementations"],"sub_categories":[],"readme":"# MKR\n\nThis repository is the implementation of MKR ([arXiv](https://arxiv.org/abs/1901.08907)):\n\n\u003e Multi-Task Feature Learning for Knowledge Graph Enhanced Recommendation  \nHongwei Wang, Fuzheng Zhang, Miao Zhao, Wenjie Li, Xing Xie, and Minyi Guo.  \nIn Proceedings of The 2019 Web Conference (WWW 2019)\n\n![](https://github.com/hwwang55/MKR/blob/master/framework.png)\n\nMKR is a **M**ulti-task learning approach for **K**nowledge graph enhanced **R**ecommendation.\nMKR consists of two parts: the recommender system (RS) module and the knowledge graph embedding (KGE) module. \nThe two modules are bridged by *cross\u0026compress* units, which can automatically learn high-order interactions of item and entity features and transfer knowledge between the two tasks.\n\n\n### Files in the folder\n\n- `data/`\n  - `book/`\n    - `BX-Book-Ratings.csv`: raw rating file of Book-Crossing dataset;\n    - `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;\n    - `kg.txt`: knowledge graph file;\n  - `movie/`\n    - `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;\n    - `kg.txt`: knowledge graph file;\n    - `ratrings.dat`: raw rating file of MovieLens-1M;\n  - `music/`\n    - `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;\n    - `kg.txt`: knowledge graph file;\n    - `user_artists.dat`: raw rating file of Last.FM;\n- `src/`: implementations of MKR.\n\n\n\n\n### Running the code\n- Movie\n  ```\n  $ cd src\n  $ python preprocess.py --dataset movie\n  $ python main.py\n  ```\n- Book\n  - ```\n    $ cd src\n    $ python preprocess.py --dataset book\n    ```\n  - open `main.py` file;\n    \n  - comment the code blocks of parameter settings for MovieLens-1M;\n    \n  - uncomment the code blocks of parameter settings for Book-Crossing;\n    \n  - ```\n    $ python main.py\n    ```\n- Music\n  - ```\n    $ cd src\n    $ python preprocess.py --dataset music\n    ```\n  - open `main.py` file;\n    \n  - comment the code blocks of parameter settings for MovieLens-1M;\n    \n  - uncomment the code blocks of parameter settings for Last.FM;\n    \n  - ```\n    $ python main.py\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwwang55%2FMKR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwwang55%2FMKR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwwang55%2FMKR/lists"}