Skip to content

EffectEstimate dataclass #353

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

Merged
merged 4 commits into from
Aug 11, 2025

Conversation

jmafoster1
Copy link
Contributor

@jmafoster1 jmafoster1 commented Aug 7, 2025

Closes #340.

  • Renamed TestValue class to EffectEstimate and moved it into estimation
  • Changed to having estimators return an EffectEstimate instance rather than a tuple

This is much cleaner than the old solution as estimation methods now return one tidy object that's always of the same type.

Copy link

github-actions bot commented Aug 7, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 33 0 0.93s
✅ PYTHON pylint 33 0 5.49s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Aug 7, 2025

Codecov Report

❌ Patch coverage is 96.51163% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.28%. Comparing base (9816b98) to head (6346755).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
causal_testing/testing/causal_test_result.py 77.77% 2 Missing ⚠️
causal_testing/main.py 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   95.67%   96.28%   +0.61%     
==========================================
  Files          27       28       +1     
  Lines        1618     1590      -28     
==========================================
- Hits         1548     1531      -17     
+ Misses         70       59      -11     
Files with missing lines Coverage Δ
...ausal_testing/estimation/cubic_spline_estimator.py 96.66% <100.00%> (+0.11%) ⬆️
causal_testing/estimation/effect_estimate.py 100.00% <100.00%> (ø)
...ausal_testing/estimation/experimental_estimator.py 100.00% <100.00%> (ø)
...ting/estimation/instrumental_variable_estimator.py 100.00% <100.00%> (ø)
causal_testing/estimation/ipcw_estimator.py 99.25% <100.00%> (+<0.01%) ⬆️
..._testing/estimation/linear_regression_estimator.py 100.00% <100.00%> (ø)
...esting/estimation/logistic_regression_estimator.py 100.00% <100.00%> (ø)
...l_testing/surrogate/surrogate_search_algorithms.py 98.48% <100.00%> (ø)
causal_testing/testing/causal_effect.py 98.59% <100.00%> (+0.04%) ⬆️
causal_testing/testing/causal_test_adequacy.py 86.76% <100.00%> (-0.25%) ⬇️
... and 3 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ad05e2...6346755. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jmafoster1 jmafoster1 marked this pull request as ready for review August 7, 2025 12:58
@jmafoster1 jmafoster1 requested a review from f-allian August 7, 2025 12:58
Copy link
Contributor

@f-allian f-allian left a comment

Choose a reason for hiding this comment

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

@jmafoster1 Good idea moving this all into a data class. Looks good to me 👍🏼

@jmafoster1 jmafoster1 merged commit d3dd4ab into main Aug 11, 2025
22 checks passed
@jmafoster1 jmafoster1 deleted the jmafoster1/340-make-confidence-intervals-dicts branch August 11, 2025 10:26
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.

Confidence intervals are lists
2 participants