Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relational paths for non-existing triples #1

Open
kalinin-sanja opened this issue Oct 29, 2020 · 6 comments
Open

Relational paths for non-existing triples #1

kalinin-sanja opened this issue Oct 29, 2020 · 6 comments

Comments

@kalinin-sanja
Copy link

Let's assume, we want to get model scores for a non-existing triple, i.e., a pair of nodes, which is not connected. It looks like we should calculate relational paths for non-existing triples during the calculation of paths for train/valid/test, because of Bag-Of-Paths (BOP). Or should we calculate those paths after training and use only that paths, which are presented in the train+valid+test?

@hwwang55
Copy link

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

@kalinin-sanja
Copy link
Author

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

So, we just once calculate the Bag-Of-Paths vector in the train set and believe that some of these paths will occur between any new pair?

@hwwang55
Copy link

Yes, that's the idea.

@zhiweihu1103
Copy link

zhiweihu1103 commented Apr 5, 2022

Hi! If you are going to use the model to evaluate the score for a (h, t) pair, you need to calculate all paths connecting h and t presented in the training data.

Hi, all the paths you mentioned here refer to whether train.txt+valid.txt+test.txt constitutes all the paths between h and t in the graph or train.txt constitutes all the paths between h and t in the graph.

If only train.txt is used to construct the path between (h, t), then for the WN18RR dataset, some entities in test.txt do not exist in train.txt. In this case, how can the path from the corresponding entity to other entities be obtained?

@hwwang55
Copy link

hwwang55 commented Apr 5, 2022

Hi! You can only use training data to calculate paths since training data is all you know when training the model. If a node does not appear in training data, then there is no path connecting this node to others. PathCon cannot handle these nodes.

@zhiweihu1103
Copy link

OK, Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants