mnick / holographic-embeddings Goto Github PK
View Code? Open in Web Editor NEWCode for experiments in the AAAI 2016 paper "Holographic Embeddings of Knowledge Graphs"
Code for experiments in the AAAI 2016 paper "Holographic Embeddings of Knowledge Graphs"
Hi Maximilian,
I was trying to run your project holographic-embeddings with mode=lp to get the AUC score. At first, I got the error message that
AttributeError: 'PairwiseStochasticTrainer' object has no attribute '_scores'
I only found the '_score' function is belong to the member 'model' of class 'PairwiseStochasticTrainer', so I changed the line 232
of base.py
from
scores = mdl._scores(self.ss, self.ps, self.os)
to
scores = mdl.model._scores(self.ss, self.ps, self.os)
It works now, but I still want to make sure whether it is the right way to do that!
Thank for your kindly help and looking forward to your reply.
Best,
Daye SHAO
Hello @mnick .
I'm am working in a project which uses https://github.com/mnick/scikit-kge library (and it's great!). That project is licensed under MIT terms, but this project, which seems useful to me, hasn't any license available.
Is it possible to add a LICENSE file, in order to know the terms in which this software can be used?
Thanks!
Hello,
I tried to execute the scripts but it gives me this error :
Traceback (most recent call last):
File "kg/run_hole.py", line 61, in <module>
ExpHolE().run()
File "/home/thomas/dev/KGE/holographic-embeddings/kg/base.py", line 50, in run
self.train()
File "/home/thomas/dev/KGE/holographic-embeddings/kg/base.py", line 154, in train
trn.fit(xs, ys)
File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/scikit_kge-0.1-py3.6.egg/skge/base.py", line 197, in fit
scores_o = self.scores_o(mdl, s, p).flatten()
File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/scikit_kge-0.1-py3.6.egg/skge/base.py", line 142, in _optim
sampler = sample.RandomModeSampler(self.args.ne, [0, 1], xs, sz)
File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/numpy/lib/shape_base.py", line 509, in split
res = array_split(ary, indices_or_sections, axis)
File "/home/thomas/bin/miniconda/lib/python3.6/site-packages/numpy/lib/shape_base.py", line 430, in array_split
sub_arys.append(_nx.swapaxes(sary[st:end], axis, 0))
TypeError: slice indices must be integers or None or have an __index__ method
Thank you for your great work. When I learn your code, I am confused by the WN18.bin dataset, why entities in it are all numbers? what are they stand for ?
As explained in the main readme, countries dataset is supposed to be available in this repository but I can't find it.
How can one rebuild the same countries dataset used in HOLE experiments?
Thank you for your work. Besides WN18, you use FB15K for experimental evaluations. Can you release FB15K.bin and detail parameters to train the model for FB15K.
mldl@mldlUB1604:/ub16_prj/holographic-embeddings$ bash run_transe_wn18.sh/ub16_prj/holographic-embeddings$
INFO:EX-KG:Fitting model TransE with trainer PairwiseStochasticTrainer and parameters Namespace(fin='data/wn18.bin', fout=None, init='nunif', lr=0.1, margin=2.0, me=500, mode='rank', nb=100, ncomp=50, ne=1, no_pairwise=False, sampler='random-mode', test_all=50)
Traceback (most recent call last):
File "kg/run_transe.py", line 41, in
ExpTransE().run()
File "/home/mldl/ub16_prj/holographic-embeddings/kg/base.py", line 50, in run
self.train()
File "/home/mldl/ub16_prj/holographic-embeddings/kg/base.py", line 154, in train
trn.fit(xs, ys)
File "/usr/local/lib/python3.5/dist-packages/scikit_kge-0.1-py3.5.egg/skge/base.py", line 197, in fit
scores_o = self.scores_o(mdl, s, p).flatten()
File "/usr/local/lib/python3.5/dist-packages/scikit_kge-0.1-py3.5.egg/skge/base.py", line 142, in _optim
sampler = sample.RandomModeSampler(self.args.ne, [0, 1], xs, sz)
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/shape_base.py", line 509, in split
res = array_split(ary, indices_or_sections, axis)
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/shape_base.py", line 430, in array_split
sub_arys.append(_nx.swapaxes(sary[st:end], axis, 0))
TypeError: slice indices must be integers or None or have an index method
mldl@mldlUB1604:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.