Skip to content

Jmafoster1/dashboard paper - #426

Open
jmafoster1 wants to merge 28 commits into
mainfrom
jmafoster1/dashboard-paper
Open

jmafoster1 wants to merge 28 commits into
mainfrom
jmafoster1/dashboard-paper

Conversation

@jmafoster1

@jmafoster1 jmafoster1 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Final updates for the visualisation paper, including a fixed version of #424, which this PR subsumes.

This PR adds an "easy interpret" option for causal data adequacy that puts the absolute kurtosis value through a sigmoid function and converts it to a "percentage". Closes #412. Credit to @SylviaWhittle for the original idea. Hope this isn't stepping on your toes, I just thought it'd be good to get it in the paper (which I plan to write this week).

What I ended up doing was taking the absolute kurtosis value and putting that through a sigmoid such that kurtoses close to zero correspond to values close to 100 and kurtoses far from zero correspond to values close to zero. A kurtosis of -0.8 corresponds to 50, since a uniform distribution (which represents just about the worst case that it's possible to get here) has a kurtosis of -1.2. Using -0.8 roughly corresponds to a distribution that's visually "about half way" between a uniform distribution and the normal distribution that gives a perfect value (the scale is not linear).

Main file changes

causal_testing/testing/data_adequacy.py - added a simplified_kurtosis function.

I also added the option to flip between raw and simplified values in the dashboard (with simplified being the default) and added explanations in there.

I've also made an causal-testing/examples' directory within the CTF itself so that users can import example DAGs and data directly from their programs. This is part of a longer-term campaign to properly integrate the current ./examples` directory into the framework. (This will be done as part of a larger PR)

The other changes are tests and docs.

Checklist

Before you mark your PR as ready for review, please ensure you have completed the following.

  • Added unit tests for new functionality
  • Properly documented any new code
  • Updated Sphinx documentation in docs/ and checked for updated configuration/runtime options
  • Added a jupyter notebook tutorial in docs/source/tutorials for any new functionality
  • Verified local docs build with sphinx-build -W source/ build

@jmafoster1 jmafoster1 mentioned this pull request Nov 9, 2026
5 tasks done
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ PYTHON black 41 1 1.04s
✅ PYTHON pylint 41 0 6.53s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.08%. Comparing base (6c34b62) to head (27be34c).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #426      +/-   ##
==========================================
+ Coverage   97.94%   98.08%   +0.13%     
==========================================
  Files          29       34       +5     
  Lines        1898     2035     +137     
==========================================
+ Hits         1859     1996     +137     
  Misses         39       39              
Files with missing lines Coverage Δ
causal_testing/causal_testing_framework.py 100.00% <100.00%> (ø)
...ting/estimation/instrumental_variable_estimator.py 100.00% <100.00%> (ø)
...ting/examples/covasim/disease_variants/__init__.py 100.00% <100.00%> (ø)
...g/examples/covasim/vaccinating_elderly/__init__.py 100.00% <100.00%> (ø)
causal_testing/examples/lr91/__init__.py 100.00% <100.00%> (ø)
..._testing/examples/poisson_line_process/__init__.py 100.00% <100.00%> (ø)
...mples/poisson_line_process/poisson_line_process.py 100.00% <100.00%> (ø)
causal_testing/specification/causal_dag.py 99.56% <100.00%> (ø)
causal_testing/testing/data_adequacy.py 100.00% <100.00%> (ø)
causal_testing/visualisation/geometry.py 100.00% <100.00%> (ø)
... and 2 more

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 7ab4da9...27be34c. 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 force-pushed the jmafoster1/dashboard-paper branch from 5463532 to e9aa3c8 Compare November 10, 2026 09:02
@jmafoster1
jmafoster1 force-pushed the jmafoster1/dashboard-paper branch from 5eab173 to 5255471 Compare November 10, 2026 09:30
@jmafoster1
jmafoster1 marked this pull request as ready for review November 10, 2026 10:40
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.

Sigmoid test adequacy

1 participant