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

[ENH] Consistent extension sampling of CPDAG, PDAG and DAG #102

Merged
merged 17 commits into from
Dec 6, 2023

Conversation

adam2392
Copy link
Collaborator

@adam2392 adam2392 commented Nov 24, 2023

Fixes #38

Changes proposed in this pull request:

  • Addresses going from DAG to CPDAG and CPDAG to DAG

This implements the relevant algorithms needed to go to/from DAG, PDAG and CPDAG. These are all useful for representing classes of graphs encoding similar, or the same relevant d-separation invariances. These suite of functions are ultimately useful for implementing "Greedy Equivalent Search (GES)" natively in dodiscover.

Before submitting

  • 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.

@adam2392 adam2392 marked this pull request as ready for review November 27, 2023 01:44
@adam2392
Copy link
Collaborator Author

@aryan26roy no rush, but whenever you have the chance, perhaps you'd be interested in reviewing this PR.

cc: @jaron-lee too

Signed-off-by: Adam Li <[email protected]>
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (9c6a556) 77.39% compared to head (4a1cd8f) 78.04%.

❗ Current head 4a1cd8f differs from pull request most recent head 8cba951. Consider uploading reports for the commit 8cba951 to get more accurate results

Files Patch % Lines
pywhy_graphs/algorithms/generic.py 81.81% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #102      +/-   ##
==========================================
+ Coverage   77.39%   78.04%   +0.65%     
==========================================
  Files          43       44       +1     
  Lines        3614     3731     +117     
  Branches     1053     1089      +36     
==========================================
+ Hits         2797     2912     +115     
- Misses        596      597       +1     
- Partials      221      222       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
@aryan26roy
Copy link
Collaborator

@aryan26roy no rush, but whenever you have the chance, perhaps you'd be interested in reviewing this PR.

cc: @jaron-lee too

@adam2392 Sorry for the late reply. Will review!

Copy link
Collaborator

@jaron-lee jaron-lee left a comment

Choose a reason for hiding this comment

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

I did a lightweight review - mostly looks good to me but I'm a bit out of the loop so could have missed some bigger picture thingsg.

pywhy_graphs/algorithms/cpdag.py Show resolved Hide resolved
pywhy_graphs/algorithms/generic.py Show resolved Hide resolved
pywhy_graphs/algorithms/tests/test_cpdag.py Outdated Show resolved Hide resolved
pywhy_graphs/algorithms/tests/test_cpdag.py Outdated Show resolved Hide resolved
Signed-off-by: Adam Li <[email protected]>
@adam2392
Copy link
Collaborator Author

adam2392 commented Dec 6, 2023

Thanks for the reviews @jaron-lee and @aryan26roy !

@adam2392 adam2392 merged commit ed4cb7f into py-why:main Dec 6, 2023
21 of 22 checks passed
@adam2392 adam2392 deleted the cpdag branch December 6, 2023 17:16
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.

Consistent extension of a PDAG
3 participants