AI_Center_Project

所属分类:自动编程
开发工具:Jupyter Notebook
文件大小:0KB
下载次数:0
上传日期:2023-11-09 14:21:17
上 传 者sh-1993
说明:  项目回购,包含为春季在苏黎世联邦理工学院举办的“机器学习研究中的人工智能中心项目”课程开发的代码...
(Project repo containing the code developed for the course " AI Center Projects in Machine Learning Research" held at ETH Zurich in Spring 2022)

文件列表:
.env.tmp (209, 2023-11-09)
aux_data/ (0, 2023-11-09)
aux_data/WN18RR/ (0, 2023-11-09)
aux_data/WN18RR/wordnet-mlj12-definitions.txt (4414562, 2023-11-09)
aux_data/data_rel_matrices/ (0, 2023-11-09)
aux_data/data_rel_matrices/distmult_wn18rr_bert.pkl (22657, 2023-11-09)
aux_data/data_rel_matrices/transe_wn18rr_bert.pkl (22657, 2023-11-09)
aux_data/entity2wikidata.json (4187025, 2023-11-09)
bert_embs.py (10742, 2023-11-09)
checkpoints/ (0, 2023-11-09)
config/ (0, 2023-11-09)
config/distmult_fb15k237.json (1221, 2023-11-09)
config/distmult_wn18rr.json (1219, 2023-11-09)
config/mure_fb15k237.json (1092, 2023-11-09)
config/mure_wn18rr.json (1090, 2023-11-09)
config/transe_fb15k237.json (920, 2023-11-09)
config/transe_wn18rr.json (917, 2023-11-09)
config/tucker_fb15k237.json (1060, 2023-11-09)
config/tucker_wn18rr.json (1129, 2023-11-09)
data_relation_init.py (6164, 2023-11-09)
figures/ (0, 2023-11-09)
figures/.ipynb_checkpoints/ (0, 2023-11-09)
figures/.ipynb_checkpoints/Untitled-checkpoint.ipynb (37051, 2023-11-09)
figures/baseline_200.csv (114712, 2023-11-09)
figures/baseline_256.csv (67818, 2023-11-09)
figures/baseline_300.csv (115262, 2023-11-09)
figures/bert_256.csv (68052, 2023-11-09)
figures/bert_layer0.csv (63929, 2023-11-09)
figures/bert_layer2.csv (67832, 2023-11-09)
figures/bert_layer4_stem.csv (68290, 2023-11-09)
figures/emb_all.svg (27746, 2023-11-09)
figures/fasttext_200.csv (67913, 2023-11-09)
figures/fasttext_300.csv (67932, 2023-11-09)
figures/glove_200.csv (114924, 2023-11-09)
figures/layers.svg (9362, 2023-11-09)
figures/plotting.ipynb (187734, 2023-11-09)
figures/stemming.svg (8337, 2023-11-09)
... ...

# AI_Center_Project Project repo containing the code developed for the course " AI Center Projects in Machine Learning Research" held at ETH Zurich in Spring 2022 ## Table of Contents - [AI_Center_Project](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#ai_center_project) - [Table of Contents](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#table-of-contents) - [How to run](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#how-to-run) - [Supported datasets](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#supported-datasets) - [Supported KG models](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#supported-kg-models) - [Supported Language models](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/#supported-language-models) ## How to run **Step 1:** Clone the repository: ```console git clone https://github.com/LucaMalagutti/AI_Center_Project ``` **Step 2:** Copy new .env file and modify it by adding your environment variables, you can obtain your wandb key at https://wandb.ai/settings: ```console cp .env.tmp .env vim .env ``` Example of ``.env`` file: ```console WANDB_API_KEY = Your Key ``` **Step 3:** Create virtual environment called ``venv`` and install packages: ```console python -m venv venv pip install -r requirements.txt ``` **Step 4:** Download Emdeddings file and save it in ``./word_vectors/``. ```console python prep_models.py --models w2v glove fasttext fasttext_300 ``` **Step 5:** Train the model with your embeddings. Example of how to train: ```console python3 train.py --dataset=wn18rr --model=tucker --init=w2v ``` ## Supported datasets | Name | Documentation | Citation | Entities | Relations | Triples | |------------------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|------------|-------------|-----------| | WN18RR | [`pykeen.datasets.WN18RR`](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://pykeen.readthedocs.io/en/latest/api/pykeen.datasets.WN18RR.html) | [Toutanova *et al*., 2015](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://www.aclweb.org/anthology/W15-4007/) | 40559 | 11 | 92583 | | FB15k237 | [`pykeen.datasets.FB15k237`](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://pykeen.readthedocs.io/en/latest/api/pykeen.datasets.FB15k237.html) | [Toutanova *et al*., 2015](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://www.aclweb.org/anthology/W15-4007/) | 14505 | 237 | 310079 | ## Supported KG models | Name | Model | Interaction | Citation | |--------------------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------| | TuckER | [`pykeen.models.TuckER`](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://pykeen.readthedocs.io/en/latest/api/pykeen.models.TuckER.html) | [`pykeen.nn.TuckerInteraction`](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://pykeen.readthedocs.io/en/latest/api/pykeen.nn.TuckerInteraction.html) | [Balaevi *et al.*, 2019](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://arxiv.org/abs/1901.09590) | | ## Supported Language models | Name | Citation | |--------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | Word2Vec | [Mikolov *et al.*, 2013](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://arxiv.org/pdf/1301.3781.pdf) | | GloVe | [Pennington *et al.*, 2014](https://github.com/LucaMalagutti/AI_Center_Project/blob/master/https://aclanthology.org/D14-1162.pdf) |

近期下载者

相关文件


收藏者