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

Handle symmetric relationships #18

Open
cbizon opened this issue Jul 28, 2020 · 1 comment
Open

Handle symmetric relationships #18

cbizon opened this issue Jul 28, 2020 · 1 comment

Comments

@cbizon
Copy link
Contributor

cbizon commented Jul 28, 2020

he first thing that we do is look for answers that can be smushed together. We currently have a strict definition. Two answers must be exactly the same, except for the identity of one node. "exactly the same" extends to edges. So let's say that our question is A-B. We'll take any edge type.

It's very easy to end up with cases where A and B are connected by multiple edge types. Our strictness means that all edge directions must match. But some edges are symmetric. For example 'related_to' or 'correlated_with'

So for instance, A-[related_to]->B will merge with A-[related_to]->B' but not with A<-[related to]-B'.

That's wrong because there's no real reason to favor one direction over another. Note that this needs to happen both for edges attached to our candidate node, but also to the whole knowledge graph.

Probably a simple way to do this is to immediately cycle through the KG, looking for symmetric edge types, and flipping them so that they are all have source_id as the lexigraphically low node in the relationship.

@cbizon
Copy link
Contributor Author

cbizon commented Jul 28, 2020

One aspect of this will involve finding out which relations are symmetric. Probably should do a PR on biolink and then pull this from bl-lookup.

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

No branches or pull requests

1 participant