A database should contain three files:
data.txt: each row is a triple. e.g. Disease_or_Syndrome Affects Plant
entities.txt: each row is a entity name. e.g. Plant
relations.txt: each row is a relation name. e.g. Affects
See the data directory.
Class is core.knowledge_graph.KnowledgeGraph
Usage example
from core.knowledge_graph import KnowledgeGraph
database = KnowledgeGraph()
database.read_data_from_txt('data/kin')
Scripts will not be made as command line apps,
since they will eventually be merged with GUI.
Run script ./tensor_factorization.py
Change hyperparameters directly in scripts.
- ER-MLP: run
./train_er_mlp.py
- NTN: run
./train_ntn.py
Change hyperparameters directly in scripts.
During the training, run tensorboard --logdir=tmp/log/
for monitoring.
Experiments are in IPython notebook nominal_experiment.ipynb
.
ER-MLP and NTN trained for kin_nominal dataset are stored in saved_model/