py-why / pywhy-graphs

[Experimental] Causal graphs that are networkx-compliant for the py-why ecosystem.
https://py-why.github.io/pywhy-graphs/dev/index.html
MIT License
47 stars 8 forks source link

[ENH] Add the ability to check if an edge is "visible" #119

Open aryan26roy opened 2 months ago

aryan26roy commented 2 months ago

Fixes #115

Changes proposed in this pull request:

Before submitting

After submitting

aryan26roy commented 2 months ago

@adam2392 What does this sign mean?

V •→X

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?

adam2392 commented 2 months ago

That is answered on pg2 of https://auai.org/uai2015/proceedings/papers/155.pdf.

Lmk if you have other questions too.

aryan26roy commented 2 months ago

Does a function already exists to find if a collider path exists between two nodes in a graph?

adam2392 commented 1 month ago

Does a function already exists to find if a collider path exists between two nodes in a graph?

I don't think so, but all_vstructures is similar, so you can modify that implementation to get a new function all_collider_paths(src, target, G).

aryan26roy commented 1 month ago

@adam2392 The paper says:

A path of length one is a trivial collider path.

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.

adam2392 commented 1 month ago

@adam2392 The paper says:

A path of length one is a trivial collider path.

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.