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

[BUG, ENH] Implement BFS m-separation algorithm #48

Merged
merged 6 commits into from
Feb 8, 2023

Conversation

jaron-lee
Copy link
Collaborator

…tion

Signed-off-by: Jaron Lee [email protected]

Fixes #47

Changes proposed in this pull request:

Before submitting

  • [X ] I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

  • All GitHub Actions jobs for my pull request have passed.

@jaron-lee jaron-lee changed the title implement breadth first search first BayesBall algorithm for m-separa… Implement BFS m-separation algorithm Feb 7, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2023

Codecov Report

Merging #48 (00fe4ad) into main (35e860c) will increase coverage by 0.08%.
The diff coverage is 98.36%.

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
+ Coverage   68.90%   68.98%   +0.08%     
==========================================
  Files          27       27              
  Lines        2029     2038       +9     
  Branches      497      510      +13     
==========================================
+ Hits         1398     1406       +8     
  Misses        526      526              
- Partials      105      106       +1     
Impacted Files Coverage Δ
..._graphs/networkx/algorithms/causal/m_separation.py 98.68% <98.36%> (-1.32%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Jaron Lee <[email protected]>
@adam2392 adam2392 self-requested a review February 7, 2023 21:22
@adam2392 adam2392 changed the title Implement BFS m-separation algorithm [BUG, ENH] Implement BFS m-separation algorithm Feb 7, 2023
Copy link
Collaborator

@adam2392 adam2392 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much LGTM and appreciate the extra unit test cases.

Just some nits on the documentation.

docs/whats_new/v0.1.rst Outdated Show resolved Hide resolved
and not in x | y | z; this process is repeated until no such nodes remain. Then, outgoing
edges from z are removed. The remaining edges are retained.
This implements the m-separation algorithm TESTSEP presented in [1]_, with additional
checks to ensure that it works for non-ancestral mixed graphs (e.g. ADMGs).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the networkx sake, in case we can get this function into their package, perhaps we can add a short description of how the algorithm works and perhaps the big-O runtime.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added!

jaron-lee and others added 2 commits February 8, 2023 09:23
Co-authored-by: Adam Li <[email protected]>
Signed-off-by: Jaron Lee <[email protected]>
@adam2392 adam2392 merged commit ba73b32 into py-why:main Feb 8, 2023
@adam2392
Copy link
Collaborator

adam2392 commented Feb 8, 2023

Thanks @jaron-lee !

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

Successfully merging this pull request may close these issues.

M-separation does not work
3 participants