Energy-Based Embedding Models for Knowledge Graphs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
dimensionality
energy
models
persistence
scripts
tools
visualization
LICENSE
README.md
config.ini
exploration_shell.py
learn_parameters.py
show_losses.py
visualize_embeddings.py

README.md

Energy-Based Embedding Models for Knowledge Graphs

Prerequisites:

# apt-get install build-essential git gfortran python-dev python-setuptools python-pip python-numpy python-scipy python-sklearn python-pandas cython libblas-dev libopenblas-dev libatlas-base-dev liblapack-dev parallel
# pip install --upgrade git+git://github.com/Theano/Theano.git
# pip install --upgrade scikit-learn pymongo patsy seaborn termcolor

The following commands use GNU Parallel for executing multiple experiments (default: 8) at the same time.

Evaluating the Energy Functions:

Freebase (FB15k):

$ ./scripts/fb15k/fb15k.py | parallel -j 8

WordNet:

$ ./scripts/wn/wn.py | parallel -j 8

Validation and test results will be stored in directories logs/wn and logs/fb15k.

Comparing the Learning Algorithms:

Freebase (FB15k):

$ ./scripts/fb15k_optimization/fb15k_optimal.py | parallel -j 8

WordNet:

$ ./scripts/wn_optimization/wn_optimal.py | parallel -j 8

Visualizing the minimization of the loss functional using various adaptive learning rates:

$ BEST_K=1 ./show_losses.py models/wn_opt/*.pkl -show
$ BEST_K=1 LOSS_THR=10000 ./show_losses.py models/fb15k_opt/*.pkl -show

Visualization