Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hwwang55/MKR
A tensorflow implementation of MKR (Multi-task Learning for Knowledge Graph Enhanced Recommendation)
https://github.com/hwwang55/MKR
knowledge-graph multi-task-learning recommender-systems
Last synced: 3 months ago
JSON representation
A tensorflow implementation of MKR (Multi-task Learning for Knowledge Graph Enhanced Recommendation)
- Host: GitHub
- URL: https://github.com/hwwang55/MKR
- Owner: hwwang55
- License: mit
- Created: 2018-08-10T15:00:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-22T02:09:13.000Z (almost 5 years ago)
- Last Synced: 2024-05-01T01:33:20.242Z (6 months ago)
- Topics: knowledge-graph, multi-task-learning, recommender-systems
- Language: Python
- Homepage:
- Size: 14.3 MB
- Stars: 315
- Watchers: 10
- Forks: 109
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- graph-networks - MKR (multi-task learning for knowledge graph enhanced recommendation)
README
# MKR
This repository is the implementation of MKR ([arXiv](https://arxiv.org/abs/1901.08907)):
> Multi-Task Feature Learning for Knowledge Graph Enhanced Recommendation
Hongwei Wang, Fuzheng Zhang, Miao Zhao, Wenjie Li, Xing Xie, and Minyi Guo.
In Proceedings of The 2019 Web Conference (WWW 2019)![](https://github.com/hwwang55/MKR/blob/master/framework.png)
MKR is a **M**ulti-task learning approach for **K**nowledge graph enhanced **R**ecommendation.
MKR consists of two parts: the recommender system (RS) module and the knowledge graph embedding (KGE) module.
The two modules are bridged by *cross&compress* units, which can automatically learn high-order interactions of item and entity features and transfer knowledge between the two tasks.### Files in the folder
- `data/`
- `book/`
- `BX-Book-Ratings.csv`: raw rating file of Book-Crossing dataset;
- `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;
- `kg.txt`: knowledge graph file;
- `movie/`
- `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;
- `kg.txt`: knowledge graph file;
- `ratrings.dat`: raw rating file of MovieLens-1M;
- `music/`
- `item_index2entity_id.txt`: the mapping from item indices in the raw rating file to entity IDs in the KG;
- `kg.txt`: knowledge graph file;
- `user_artists.dat`: raw rating file of Last.FM;
- `src/`: implementations of MKR.### Running the code
- Movie
```
$ cd src
$ python preprocess.py --dataset movie
$ python main.py
```
- Book
- ```
$ cd src
$ python preprocess.py --dataset book
```
- open `main.py` file;
- comment the code blocks of parameter settings for MovieLens-1M;
- uncomment the code blocks of parameter settings for Book-Crossing;
- ```
$ python main.py
```
- Music
- ```
$ cd src
$ python preprocess.py --dataset music
```
- open `main.py` file;
- comment the code blocks of parameter settings for MovieLens-1M;
- uncomment the code blocks of parameter settings for Last.FM;
- ```
$ python main.py
```