Skip to content

pminervini/ebemkg

Repository files navigation

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

About

Energy-Based Embedding Models for Knowledge Graphs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages