GithubHelp home page GithubHelp logo

malllabiisc / hyte Goto Github PK

View Code? Open in Web Editor NEW
173.0 11.0 50.0 430 KB

EMNLP 2018: HyTE: Hyperplane-based Temporally aware Knowledge Graph Embedding

License: Apache License 2.0

Python 100.00%
knowledge-graph knowledge-base embedding representation-learning temporal-information machine-learning wikidata yago tensorflow

hyte's People

Contributors

parthatalukdar avatar ssdasgupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyte's Issues

dataset

can you upload the dataset file, thanks!

Time-dependent negative sampling

Thanking for sharing your code!
I'm having a hard time figuring out how you implement the "time-dependent negative sampling(TDNS)" in your paper, can you help me on this? I think the negative sampling process is implemented in line 243-270 of "time_proj.py", isn't this the normal sampling(or "TANS" in your paper)? Or did I miss something?

No Code for hit@10 in result_eval.py.

I couldn't find any code to calculate hit@10 metric for the tail and head prediction in the result_eval file.
So, I wrote a piece of code after the line number 68. Let me know if it is correct or not?

tail_array = np.array(ranks_tail)
head_array = np.array(ranks_head)

hit_at_10_tail = tail_array[np.where( tail_array < 10 ) ]
hit_at_10_head = head_array[np.where( head_array < 10 ) ]

print('Epoch {} : test_tail HIT@10 {}\t test_head HIT@!) {}'.format(k ,len(hit_at_10_tail)/float(len(tail_array))*100, len(hit_at_10_head)/float(len(head_array))*100))

What does stat.txt mean?

I have been researched static knowledge graph completion. Now I am going to research TKGC, and I've never seen stat.txt,I'd be grateful if someone could give me a explanation.

parsing problem

Hi thanks for the code.
But I found some problematic part in your code

in
time_proj.py
in def load_data()
there is this code snippet

with open(self.p.dataset,'r') as filein:
	for line in filein:
		train_triples.append([int(x.strip()) for x in line.split()[0:3]])
		triple_time[count] = [x.split('-')[0] for x in line.split()[3:5]] 
		count+=1

self.p.dataset means the trainset of data.
and the line

triple_time[count] = [x.split('-')[0] for x in line.split()[3:5]] 

splits time interval part with '-'
but inside YAGO's dataset, there is fact like this
image
And this fact's start time will be parsed like this
image

It seems problematic to me...
Isn't it???

sample data

hi I want to run this code on my system but the data is too large, how can I execute code on local system?

Training problem

  python time_proj.py -data_type yago -margin 10 -model MODEL_NAME -test_freq 25 

hello,I cannot find the parameter MODEL_NAME.

Testing procedure

While testing, it looks like the model only looks at the start time of an interval. Is that correct?

reason why deleting triples?

Hi
I'm curious about this code snippet

for i in range (len(train_triples)-1,-1,-1): # range(start, stop, step)
			if i not in keep_idx:
				del train_triples[i] 
                # if start / end time is like -405 or like 100, delete                
                # But why?

Why do you delete those train facts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.