Comments (3)
Yes exactly, we filter [q]_val by setting [q]_val to zero score. Let me give you one example, if there are 7 entities on a KG, e1-e7. And [q]_val = {e1,e2}, [q]_test \ [q]_val = {e3}. Then we only rank e3 against e4 to e7, masking the score of e1,e2 by making them zero.
from query2box.
Hi,
The goal of our experiments is to evaluate a model's performance in finding non-trivial answers. During evaluation, we first build a validation KG (train edges + valid edges) and a test KG (train edges + valid edges + test edges). Then given a test query q, we can achieve the answers to this query on both KGs, denoted as [q]_val and [q]_test. By non-trivial answers, we mean [q]_test / [q]_val, representing the answers that you can only achieve on the test KG but not on the validation KG.
Back to your question, the test_hard_ans dictionary contains (q, [q]_test / [q]_val), and the test_ans dictionary contains (q, [q]_test). During experiments, we only evaluate the data points in the test_hard_ans dictionary, and the reason why we also keep the test_ans dictionary is that we filter all [q]_test during ranking in order to calculate the numbers. This filtered setting is also standard in KG link prediction tasks. (It's also exactly the same case for valid_hard_ans and valid_ans).
Kindly let me know if you have additional questions.
from query2box.
Thanks for the swift reply,
I understood the first part. Here you set the [q]_test / [q]_val as the answer
Lines 1008 to 1010 in 99dc9f5
I am not exactly sure if I understand what you mean by saying "the reason why we also keep the test_ans dictionary is that we filter all [q]_test during ranking in order to calculate the numbers".
By filtering do you mean that you remove the answers in [q]_val from the overall answer set?
Also, why do you need the "false_answers" for filtering in here
Line 1001 in 99dc9f5
Line 1004 in 99dc9f5
"false_answers" is everything not in [q]_test as I understand. And every such "false_answer" edge is activated while filtering.
Lines 1011 to 1015 in 99dc9f5
Doesn't this make the score for every edge in [q]_val to be 0?
from query2box.
Related Issues (10)
- Can you release the original dataset and data processing code? HOT 1
- data
- How to convert natural language questions into logical queries
- Mapping from ids in the pkl file to the entity and relation names HOT 1
- The difference between MRR metric of one-hop path query and link prediction HOT 1
- Some question about the implementation of "ip" "pi", and "ui" HOT 3
- Make code pip installable HOT 2
- Some questions about Traceback HOT 3
- trian_triples_1c.pkl, trian_triples_2c.pkl HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from query2box.