-
Notifications
You must be signed in to change notification settings - Fork 8
[ENH] Add the ability to check if an edge is "visible" #119
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Aryan Roy <aryanroy5678@gmail.com>
@adam2392 What does this sign mean?
Does it mean that the mark at the V end can be anything or that this can be a path of arbitrary length with the last mark being an arrow pointing towards X? |
That is answered on pg2 of https://auai.org/uai2015/proceedings/papers/155.pdf. Lmk if you have other questions too. |
Does a function already exists to find if a collider path exists between two nodes in a graph? |
I don't think so, but |
Signed-off-by: Aryan Roy <aryanroy5678@gmail.com>
Signed-off-by: Aryan Roy <aryanroy5678@gmail.com>
@adam2392 The paper says:
Do they mean a triple? (Only counting the non-endpoint node for the length) Because I don't see how a path could be a collider path otherwise. |
I think they just mean a path of length one. So a single variable path is a collider, but yeah you would really only look at the path between two points usually. So a collider path is a sequence of variables <X_1, X_2, X_3, …, X_i>, where you just look at the edges between each consecutive triple <X_i-1, X_i, X_i+1> in that path to determine if they meet the collider condition. |
Signed-off-by: Aryan Roy <aryanroy5678@gmail.com>
Signed-off-by: Aryan Roy <aryanroy5678@gmail.com>
pag = PAG() | ||
pag.add_edge("Y", "X", pag.directed_edge_name) | ||
pag.add_edge("Z", "Y", pag.bidirected_edge_name) | ||
pag.add_edge("Z", "K", pag.bidirected_edge_name) | ||
pag.add_edge("K", "H", pag.bidirected_edge_name) | ||
|
||
assert False == check_visibility(pag, "X", "Y") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adam2392 Just want to check with you, this case should be false, right?
Fixes #115
Changes proposed in this pull request:
Before submitting
section of the
CONTRIBUTING
docs.Writing docstrings section of the
CONTRIBUTING
docs.After submitting