Closed aryan26roy closed 1 year ago
The tetrad implementation for reference.
@adam2392 one more question:
@adam2392 one more question:
- Neither the children method nor the parents method finds nodes connected through a bi-directed edge. Is there a function that finds child and parent nodes connected through bi-directed edges as well?
You can query the networkx subgraph. Bidirected edges are stored using a nx.Graph
.
Merging #78 (b23a6bd) into main (2d6f1d3) will increase coverage by
0.09%
. The diff coverage is84.61%
.
@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 80.02% 80.11% +0.09%
==========================================
Files 39 39
Lines 2838 2902 +64
Branches 759 775 +16
==========================================
+ Hits 2271 2325 +54
- Misses 408 412 +4
- Partials 159 165 +6
Impacted Files | Coverage Δ | |
---|---|---|
pywhy_graphs/algorithms/generic.py | 85.11% <84.61%> (-0.46%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@adam2392 so it turns out the "parents" method doesn't work on the bidirected sub-graph. I am using the neighbors method.(since in a bidirected graph a neighbor is also a parent.)
can you add test cases as well?
You can just construct various graphs on paper that follow the definition or not to test.
@adam2392 is this an appropriate amount of tests?
@adam2392 The implementation seems to be correct and all the tests are passing as well. Want to review?
@adam2392 I think I added all the tests you asked for. They worked without changing anything in the code. Can you take a look?
@aryan26roy thanks for iterating on this! Feel free to come to the Discord OH, or other time periods and ping the channel so we know we should discuss this if you have any questions.
Inducing paths are somewhat abstract at first tbh, so once the definition is clear, I think this will come out cleanly.
@adam2392 I have incorporated all the suggestions you gave in previous reviews except the simplifying the checks one(not sure how I would simplify this further, it looks like a neat abstraction to me). Can you take a look?
@adam2392 I made the suggested changes and some more.
Yeah, patching the bugs has wreaked havoc on my naming system. Will make everything better in my next pass.
@adam2392 The docs are not being built correctly, what am I doing wrong?
@adam2392 do you want me to fix the networkx CI issue in another PR? I can bump up the CI from [3.8, 3.10] to [3.9,3.10].
@adam2392 I have removed the example file. Do you want to merge now?
Thanks @aryan26roy !
Closes #70
Changes proposed in this pull request:
Before submitting
CONTRIBUTING
docs.CONTRIBUTING
docs.After submitting