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
46 stars 8 forks source link

FEA A function to determine if an edge is "visible" #115

Open adam2392 opened 1 month ago

adam2392 commented 1 month ago

Is your feature request related to a problem? Please describe. In causal graphs (DAG, ADMG, CPDAG, PAG, MAG), there is the notion of an edge being visible. For the DAG/ADMG/CPDAG, edges are by definition always visible.

Describe the solution you'd like Implement function visible_edge(graph, source, target) to determine if the edge between source and target is visible or not.

One can follow the papers https://auai.org/uai2015/proceedings/papers/155.pdf and https://www.jmlr.org/papers/volume18/16-319/16-319.pdf, and figures to use as unit-test cases.

Additional context https://github.com/py-why/dowhy/issues/402#issuecomment-1404457573

adam2392 commented 1 month ago

cc: @aryan26roy

aryan26roy commented 1 month ago

@adam2392 does this need to be implemented before #112 ? I kind of forgot the order in which we need to call these functions.

adam2392 commented 1 month ago

No I think visibility is a graphical property of an edge.

Proper possibly directed paths is just a generator function for finding paths with specific features. So I think the easiest route is to first implement all_proper_pd_paths generator function, and then implement visible_edge discussed in this GH issue, and then finally implement the generator function for m_separating_sets discussed in #116