CaCu models: survival interval, yearly PIM horizons, registry listing of production scenarios #14

Merged
edgar merged 6 commits from integration/cacu-indicadores into dev 2026-11-22 23:24:57 -06:00
Member

What changes

  • Survival: a case is a carcinoma, invasive or in situ. Each risk comes with a 95 % bootstrap interval per combination of age group, cytology and HPV, stored in the registered model (risk_interval_level, risk_interval_replicas); a combination unseen in training has no interval.
  • Survival estimand: it shows the probability of surviving.
  • PIM models (surveillance, cancer, post-colposcopy, post-treatment): the curves are read at every year from 0 to 5. The horizons are evaluation points of the fitted curve, so the fit does not change. The estimands give a probability and its covariates.
  • Registry: registry.in_production(domain) lists the scenarios with a version holding the produccion alias.

Tests

uv run pytest -q tests/cacu tests/io/test_registry.py

## What changes - **Survival:** a case is a carcinoma, invasive or in situ. Each risk comes with a 95 % bootstrap interval per combination of age group, cytology and HPV, stored in the registered model (`risk_interval_level`, `risk_interval_replicas`); a combination unseen in training has no interval. - **Survival estimand:** it shows the probability of surviving. - **PIM models** (surveillance, cancer, post-colposcopy, post-treatment): the curves are read at every year from 0 to 5. The horizons are evaluation points of the fitted curve, so the fit does not change. The estimands give a probability and its covariates. - **Registry:** `registry.in_production(domain)` lists the scenarios with a version holding the `produccion` alias. ## Tests `uv run pytest -q tests/cacu tests/io/test_registry.py`
edgar added 6 commits 2026-11-22 23:24:15 -06:00
The quantity is "Probabilidad"; each scenario names the covariates it uses, which the patient's record writes under
the table; the surveillance and cancer scenarios name their index as the latest cytology with cytology and HPV
results.
The model gives the probability of dying (`muerte`, like every batch the probability of its outcome); `complement =
"supervivencia"` tells the screens to show its complement as the probability of surviving, from the first invasive
biopsy, with its covariates.
The scenario's diagnosis is the first biopsy reported as CIS or invasive carcinoma (`event_grades`), so in situ cases
are followed too and a CIS before an invasive carcinoma is the index date.
The covariates are categorical, so every member of a combination gets the same mortality. Training keeps, per
combination of its members, the percentiles of the mortality of `risk_interval_replicas` refits on bootstrap resamples
(`risk_interval_level`, 0.95), and estimating writes it as each risk's interval. A combination training never saw has
none.
The horizons are evaluation points of the fitted I-spline curve, so the fit is unchanged; each batch gains the 2- and 4-year rows.
edgar merged commit 1c445286eb into dev 2026-11-22 23:24:57 -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#14