AnchorKG

所属分类:自动编程
开发工具:Python
文件大小:242KB
下载次数:0
上传日期:2021-02-02 06:24:33
上 传 者sh-1993
说明:  这是论文的源代码:新闻推荐推理的增强锚知识图生成
(This is the source code for paper: Reinforced Anchor Knowledge Graph Generation for News Recommendation Reasoning)

文件列表:
base (0, 2021-02-02)
base\__init__.py (0, 2021-02-02)
base\base_data_loader.py (758, 2021-02-02)
base\base_model.py (646, 2021-02-02)
base\base_trainer.py (502, 2021-02-02)
config.yaml (925, 2021-02-02)
data_loader (0, 2021-02-02)
data_loader\__init__.py (0, 2021-02-02)
data_loader\data_loaders.py (2261, 2021-02-02)
framework.png (229683, 2021-02-02)
logger (0, 2021-02-02)
logger\logger.py (1153, 2021-02-02)
logger\logger_config.json (852, 2021-02-02)
main.py (763, 2021-02-02)
model (0, 2021-02-02)
model\AnchorKG.py (17686, 2021-02-02)
model\Reasoner.py (7702, 2021-02-02)
model\Recommender.py (2734, 2021-02-02)
model\__init__.py (0, 2021-02-02)
parse_config.py (6247, 2021-02-02)
requirements.txt (88, 2021-02-02)
train_test.py (3595, 2021-02-02)
trainer (0, 2021-02-02)
trainer\__init__.py (0, 2021-02-02)
trainer\trainer.py (14763, 2021-02-02)
utils (0, 2021-02-02)
utils\__init__.py (0, 2021-02-02)
utils\metrics.py (1773, 2021-02-02)
utils\pytorchtools.py (1780, 2021-02-02)
utils\util.py (12002, 2021-02-02)

# Reinforced Anchor Knowledge Graph Generation for News Recommendation Reasoning This repository contains the source code of the paper: Reinforced Anchor Knowledge Graph Generation for News Recommendation Reasoning ![framework](https://github.com/anonymwsdm/AnchorKG/blob/master/./framework.png) ## Dataset: The original data we used is from the public news dataset : [MIND](https://github.com/anonymwsdm/AnchorKG/blob/master/https://msnews.github.io). We build an item2item dataset based on the method in the paper. ####Files in data folder: - `./data/` - `kg/` - `kg.tsv: ` knowledge graph triples from Wikidata; - `entity2id.tsv` entity label to index; - `relation2id.tsv` relation label to index; - `entity2vec.vec` 100d entity embedding from TransE; - `relation2vec.vec` 100d relation embedding from TransE; - `./mind/` - `doc_embedding.tsv: ` 768d document embedding from sentence-bert; - `doc_entity.tsv` document \t entities - `train.tsv` item2item train data - `val.tsv` item2item val data - `test.tsv` item2item test data - `warmup_train.tsv` warm up training data - `warmup_test.tsv` warm up testing data ## Requeirements: python = 3.6
Pytorch = 1.4.0
scikit-learn = 0.23.2
numpy = 1.16.2
hnswlib = 0.4.0
networkx = 2.5 ## How to run the code: $ python ./main.py --config config.yaml

近期下载者

相关文件


收藏者