CaMa: survival and recurrence models, the live scenario figures, and their training from governance #7

Merged
angel merged 33 commits from feature/cama-roundtrip into dev 2026-11-21 15:03:34 -06:00
Showing only changes of commit f3be09467f - Show all commits
+3 -2
View File
@@ -16,8 +16,6 @@ from pathlib import Path
import numpy as np
import pandas as pd
from models.cama.seer_survival import pipeline
from models.cama.seer_survival.settings import load
UNAVAILABLE = ("Estadio_cat", "Tratamiento_quirurgico_cat", "Radioterapia_cat", "Quimioterapia_cat")
# What the dashboard reads: the file written by a stage, under the name it is published with.
@@ -59,6 +57,8 @@ def _recoded_frame(labelled_members: pd.DataFrame) -> pd.DataFrame:
def _seer_settings(development: dict):
"""The pipeline's own settings with this model's budget (`[config.desarrollo]`) and its Ki-67 column, which the
SEER dictionary does not have."""
from models.cama.seer_survival.settings import load
s = load()
m = s.modeling
modeling = dataclasses.replace(
@@ -84,6 +84,7 @@ def development(labelled_members: pd.DataFrame, desarrollo: dict) -> dict:
"""`{"desarrollo": record}`, or `{}` when `[config.desarrollo]` has `enabled = false`."""
if not desarrollo.get("enabled", True):
return {}
from models.cama.seer_survival import pipeline # the `seer-survival` extra: scoring a member does not need it
errors, log = {}, []
with tempfile.TemporaryDirectory() as tmp:
out = Path(tmp)