Skip to content

Water main break decision-theory example (draft) - #45

Draft
bwengals wants to merge 6 commits into
mainfrom
docs/water-mains-decision-theory
Draft

Water main break decision-theory example (draft)#45
bwengals wants to merge 6 commits into
mainfrom
docs/water-mains-decision-theory

Conversation

@bwengals

@bwengals bwengals commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

A docs example that fits a GP survival model to the City of Kitchener open water main data and uses decision theory per Rasmussen and Williams Ch 2, to turn the predictive distribution into a dollar-valued replace or defer decision.

Not ready to merge because a backtest shows that the model doesn't yet beat a naive "replace what broke before" policy because it ignores each pipe's own break history. Next step is a per-pipe frailty (or a slight reframe) before it's ready.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

bwengals added 5 commits July 18, 2026 21:48
Break records are effectively complete only from 1997 (one record in each
of 1995 and 1996), so RECORD_START and PANEL_START move to 1997.0.
notebooks/dev/ holds the two finalized runners: final_ladder_seq97.py
(M1, M2, HGB, GLM walk-forward CV with per-fold caches) and m4_cv.py
(final Model 3: additive GP blocks with frailty and iid-year effects,
R2D2 budget with a variational posterior, natural-gradient training).
watermains_plan.md records the current state and how to rerun; result
caches are gitignored and regenerate from scratch.
The dev CV scripts (final_ladder_seq97.py, m4_cv.py) run folds as concurrent workers through a WM_FOLDS subset selector, and all three GP models train at 3000 steps.

watermains.ipynb re-executed against the seq97 caches; the M1/M2/HGB/GLM tables and the Model 2 commentary now reflect the 3000-step run. Pooled 7-fold ELPD: M1 -2310.1, M2 -2260.1, HGB -2244.6, GLM -2351.4, M3 -2232.4 (M3 beats tuned HGB).
The seq97 (M1/M2/HGB/GLM) and m4 (M3) fold caches, un-ignored via .gitignore exceptions so a second machine can continue authoring without rerunning the multi-hour CV. Normally gitignored as regenerable; drop before merging to main.
setup-jupyter-mcp.sh is a one-off local JupyterLab/MCP setup helper, not project code; removed from tracking (local copy retained). The frozen-cache .gitignore exception comment no longer references machine-specific handoff.
Records the frozen 7-fold pooled table (M3 beats HGB, -2232.4 vs -2244.6), the beta_year sign change to consistently negative at 3000 steps, the notebook rewire/execution state, and the remaining Model 3 and decision-theory authoring work.
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.

1 participant