y0-causal-inference / y0

❓y0 (pronounced "why not?") is for causal inference in Python
https://y0.readthedocs.io
BSD 3-Clause "New" or "Revised" License
44 stars 10 forks source link

Extend falsification to have configurable estimator #188

Closed cthoyt closed 1 year ago

cthoyt commented 1 year ago

https://github.com/y0-causal-inference/eliater/commit/a55934f8c08d5214dc6a543b96a5859fa1fb792d re-implemented falsification because it wasn't obvious how to choose alternate tests. It turns out that Marc-Antoine actually vendored this module from pgmpy in y0.

This PR does the following

  1. Import pgmpy (optional dependency) instead of vendoring code
  2. Make estimator configurable
  3. Rename functions

CC @srtaheri @pnavada

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 75.00% and project coverage change: +0.21% :tada:

Comparison is base (39fcffd) 76.66% compared to head (9c9b405) 76.88%.

:exclamation: Current head 9c9b405 differs from pull request most recent head b7b986a. Consider uploading reports for the commit b7b986a to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #188 +/- ## ========================================== + Coverage 76.66% 76.88% +0.21% ========================================== Files 46 45 -1 Lines 3064 3028 -36 Branches 683 676 -7 ========================================== - Hits 2349 2328 -21 + Misses 620 608 -12 + Partials 95 92 -3 ``` | [Files Changed](https://app.codecov.io/gh/y0-causal-inference/y0/pull/188?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=y0-causal-inference) | Coverage Δ | | |---|---|---| | [src/y0/algorithm/falsification.py](https://app.codecov.io/gh/y0-causal-inference/y0/pull/188?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=y0-causal-inference#diff-c3JjL3kwL2FsZ29yaXRobS9mYWxzaWZpY2F0aW9uLnB5) | `96.55% <ø> (ø)` | | | [src/y0/struct.py](https://app.codecov.io/gh/y0-causal-inference/y0/pull/188?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=y0-causal-inference#diff-c3JjL3kwL3N0cnVjdC5weQ==) | `78.43% <75.00%> (-2.01%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.