CaCu PIM: risk intervals, estimand, latest-cytology index, cancer outcome; pipeline drawings #12

Merged
edgar merged 7 commits from integration/cacu-indicadores into dev 2026-11-22 13:46:20 -06:00
Member
  • Each version stores the drawing of its Hamilton dataflow (diagramas/pipeline.dot, and .svg with Graphviz).
  • A fixture test: the PIM likelihood gives KPNC's published risks (tables 1, 17, 18, 24, 25) to 1e-12.
  • Estimates carry each risk's interval when the run has risk_interval_level; a member the model can't place is left out instead of stopping the batch (scored_frame).
  • PIM: delta-method intervals; [estimand] in model.toml (what the number is); the surveillance scenario predicts from each patient's latest complete cytology before any colposcopy (prediction_index).
  • Subgroup report in percent, one y scale per panel, plain-words method text.
  • cancer_pim: the surveillance PIM with carcinoma as the outcome.

Tests: tests/cacu, tests/io, estimates and risks pass (212 + the new modules).

- Each version stores the drawing of its Hamilton dataflow (`diagramas/pipeline.dot`, and `.svg` with Graphviz). - A fixture test: the PIM likelihood gives KPNC's published risks (tables 1, 17, 18, 24, 25) to 1e-12. - Estimates carry each risk's interval when the run has `risk_interval_level`; a member the model can't place is left out instead of stopping the batch (`scored_frame`). - PIM: delta-method intervals; `[estimand]` in `model.toml` (what the number is); the surveillance scenario predicts from each patient's latest complete cytology before any colposcopy (`prediction_index`). - Subgroup report in percent, one y scale per panel, plain-words method text. - `cancer_pim`: the surveillance PIM with carcinoma as the outcome. Tests: `tests/cacu`, `tests/io`, estimates and risks pass (212 + the new modules).
edgar added 7 commits 2026-11-22 13:44:37 -06:00
Training stores the scenario's Hamilton graph as `diagramas/pipeline.dot` and, when Graphviz's `dot` is installed,
`diagramas/pipeline.svg`, listed next to the version's other files. Without the `graphviz` package there is no
drawing and training goes on.
A fixture of the published cumulative risks at 0-5 years of KPNC's tables 1, 17, 18, 24 and 25 (CIN2+ and CIN3+),
with the knots, spline coefficients and proportional factors that reproduce them, checked against
`cumulative_risk` to 1e-12. Aggregates of public tables only.
A run with `risk_interval_level` has a model that gives, after the risk at each horizon, its interval's lower and
upper ends; the estimate keeps them as `ic_bajo` and `ic_alto`, the contract checks that they hold the risk, and the
batch stores them. `scored_frame` is the one place that reads the run and calls the model, for the command and the
WebApi's cycle. A member whose risk is NaN (a combination the model never saw) is left out instead of stopping the
whole batch.
- The registered mixture gives each risk's interval at `risk_interval_level` (delta method on the log scale, from
  the fit's inverse Hessian), so the patient's risk carries it.
- `[estimand]` in `model.toml` says what the model's number is (quantity, outcome, index date, unit of the horizons,
  interval), read into `Scenario.estimand` for the screens that show it.
- The surveillance scenario predicts from each patient's latest cytology with both cytology and HPV results, before
  any colposcopy (`prediction_index = "ultima_citologia"`): every new complete sample is a new index date, and a
  sample still missing a result gives way to the one before. Patients past a colposcopy are the post-colposcopy
  scenario's. Training keeps the first cytology in the window. The rule runs inside the registered model, so it loads
  without this repository.
The figure drew proportions with no unit, which read as a risk a hundred times smaller than the table's and the
patient's. Each panel now has its own y scale, so a low-risk combination isn't flattened by a high-risk one, and the
methods describe Turnbull's curve by what each patient contributes to it.
The interval's method (delta method on the log scale) is the version's subgroup report's; the screens that show the
estimand don't need it.
The same dataflow, cohort, index and prediction index as the CIN2+ surveillance model, with carcinoma as the only
event, like the cancer column of KPNC's tables: the patient's two risks are of the same visit. The subgroup report
template serves it too.
edgar merged commit 547ceedea3 into dev 2026-11-22 13:46:20 -06:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ISSSTELEON/models#12