docs: ITS sensitivity walkthrough (#788)#821
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
TODO
I believe this plot functionality is being worked on in PR #819 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
=======================================
Coverage 94.59% 94.59%
=======================================
Files 80 80
Lines 12764 12764
Branches 770 770
=======================================
Hits 12074 12074
Misses 486 486
Partials 204 204 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Note: this PR is not a duplicate of #806. Both are follow-ups from #749, but they target different methods and different notebooks:
No overlap in files or content. |
Two small follow-ups to PR #821 to improve discoverability of the ITS sensitivity walkthrough now hosted in its_post_intervention_analysis.ipynb: - sensitivity_checks.md: add the walkthrough to the "Where examples already exist" list (PlaceboInTime + PersistenceCheck) and to the bottom :::{seealso} block. - its_pymc.ipynb: add a closing "Going further: sensitivity checks" section pointing to the central guide and the worked walkthrough. Re-executed its_pymc.ipynb in the CausalPy env so committed outputs reflect the new structure. Refs #788 Made-with: Cursor
|
Failing CI check unrelated to this PR. Fix in flight #878 |
|
Heads-up for reviewers: the failing |
Rework the notebook so readers can follow the example, persistence analysis, and sensitivity checks without prior ITS context. This keeps the focus on learner-facing questions instead of pipeline implementation details. Made-with: Cursor
Two small follow-ups to PR #821 to improve discoverability of the ITS sensitivity walkthrough now hosted in its_post_intervention_analysis.ipynb: - sensitivity_checks.md: add the walkthrough to the "Where examples already exist" list (PlaceboInTime + PersistenceCheck) and to the bottom :::{seealso} block. - its_pymc.ipynb: add a closing "Going further: sensitivity checks" section pointing to the central guide and the worked walkthrough. Re-executed its_pymc.ipynb in the CausalPy env so committed outputs reflect the new structure. Refs #788 Made-with: Cursor
babdd2a to
4c023ef
Compare
|
View / edit / reply to this conversation on ReviewNB cetagostini commented on 2026-05-02T02:54:35Z Line #5. formula="y ~ 1 + t + C(month, levels=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])",
Worth explain the formula, mostly the levels part. You can have people not familiar, at least say what numbers represent other parts are more intuitive. |
|
View / edit / reply to this conversation on ReviewNB cetagostini commented on 2026-05-02T02:54:36Z During the during intervention? |
|
View / edit / reply to this conversation on ReviewNB cetagostini commented on 2026-05-02T02:54:37Z I think this conclusion will change given the updates and corrections in the class, during my PR #826. |
|
View / edit / reply to this conversation on ReviewNB cetagostini commented on 2026-05-02T02:54:37Z During the persistent check are we checking all the remaining time series or the N weeks defined above? This was not very clear to me during the reading. |
|
View / edit / reply to this conversation on ReviewNB cetagostini commented on 2026-05-02T02:54:38Z Good, I like it |
Closes #788. Delivers the focused ITS sensitivity walkthrough requested as a follow-up to #749, scoped under #785.
Summary
docs/source/notebooks/its_post_intervention_analysis.ipynb(commit10d2210)Pipelineexample combining the defaultPlaceboInTimecheck (viacp.SensitivityAnalysis.default_for(cp.InterruptedTimeSeries)) with a customPersistenceCheck, plus a "What to do when a check looks weak" interpretation section.Cross-linking polish (commit
babdd2a)docs/source/notebooks/sensitivity_checks.md: add the walkthrough under bothPlaceboInTimeandPersistenceCheckin the "Where examples already exist" list, plus the closing:::{seealso}block.docs/source/notebooks/its_pymc.ipynb: add a closing "Going further: sensitivity checks" section pointing readers to the central guide and the new walkthrough.Scope decision
After discussion on #788, we deliberately did not propagate the full sensitivity walkthrough to every ITS variant (
its_pymc,its_covid,its_lift_test,its_pymc_comparative,piecewise_its_pymc,its_skl). Reasons:its_skl.ipynb) can't run the PyMC-only checks at all.its_pymc.ipynbcovers the use case without diluting the pedagogy of each method-specific notebook.Test plan
prek run --all-filesmake htmlits_post_intervention_analysis.ipynbexecuted end-to-end in theCausalPyenvits_pymc.ipynbre-executed end-to-end in theCausalPyenv so committed outputs reflect the new "Going further" sectioncheck-environment-ymlfailure is an unrelated upstreampyproject2condaregression, fixed by ci: pin pyproject2conda==0.22.1 to work around 0.23.0 regression #878)notebooks/its_post_intervention_analysis.htmlshows the new pipeline + persistence narrative;notebooks/its_pymc.htmlends with the "Going further"seealsoblock;notebooks/sensitivity_checks.htmllists the walkthrough underPlaceboInTimeandPersistenceCheck