Skip to content

SURE - Discovering causal structure#385

Draft
Jake248Newman wants to merge 28 commits into
CITCOM-project:mainfrom
Jake248Newman:main
Draft

SURE - Discovering causal structure#385
Jake248Newman wants to merge 28 commits into
CITCOM-project:mainfrom
Jake248Newman:main

Conversation

@Jake248Newman

Copy link
Copy Markdown

No description provided.

Comment thread causal_testing/discovery/hill_climber.py Outdated
Comment thread causal_testing/__main__.py Outdated

@jmafoster1 jmafoster1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is looking good so far!

Comment thread causal_testing/main.py Outdated
@Jake248Newman Jake248Newman changed the title SURE - Discovering causal structures SURE - Discovering causal structure Jun 23, 2026
Jake248Newman and others added 3 commits June 23, 2026 10:43
Co-authored-by: Michael Foster <13611658+jmafoster1@users.noreply.github.com>
Comment thread tests/discovery_tests/test_hill_climber.py Outdated
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.80892% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.21%. Comparing base (6dae63f) to head (040c11a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
causal_testing/discovery/hill_climber.py 87.50% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
- Coverage   97.89%   97.21%   -0.69%     
==========================================
  Files          27       28       +1     
  Lines        1568     1721     +153     
==========================================
+ Hits         1535     1673     +138     
- Misses         33       48      +15     
Files with missing lines Coverage Δ
causal_testing/__main__.py 97.95% <100.00%> (+0.34%) ⬆️
..._testing/estimation/linear_regression_estimator.py 100.00% <ø> (ø)
...esting/estimation/logistic_regression_estimator.py 100.00% <ø> (ø)
causal_testing/main.py 100.00% <100.00%> (ø)
causal_testing/specification/causal_dag.py 98.25% <100.00%> (ø)
causal_testing/testing/causal_effect.py 100.00% <100.00%> (+1.44%) ⬆️
causal_testing/discovery/hill_climber.py 87.50% <87.50%> (ø)

Continue to review full report in Codecov by Harness.

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

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

---------------------
The tool supports various configurations to tailor the discovery process to your specific dataset and domain knowledge:

* **Fitness Functions** Choose between score-based and multi-objective fitness functions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've dropped out the ability to specify different fitness functions on the Hill Climber, since what I was actually thinking of was the multi-objective NSGA that I've now added.


* **Fitness Functions** Choose between score-based and multi-objective fitness functions.

* **Search Constraints (Iterations)**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Probably worth documenting each technique and its parameters separately here. We can potentially use :autoclass for this, like I did here

* **Excluding Edges:** If domain knowledge dictates that ``max_doses`` has no causal effect on any outputs, you
can specify ``max_doses -> ".*"`` and ``".*" -> max_doses`` in the *exclude edges* dot file.
* **Including Edges:** If it is known that ``vaccine`` directly affects all three outputs, you can specify
``vaccine -> "cum_.*"`` in the *include edges* dot file. No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It'd also be good to include the exact command to run to get the DAG (and possibly a quick tutorial IPYNB) in tutorials/

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.

2 participants