Scenarios: batch_estimates turns off the cycle's per-member scoring; off for CaMa recurrence, answered per clinical scenario
This commit is contained in:
@@ -11,6 +11,8 @@ Análisis de recurrencia: probabilidad de que la enfermedad regrese a los 12, 36
|
||||
regresión logística y una red bayesiana por horizonte, entrenadas con las pacientes cargadas de dos cohortes externas (METABRIC y SCAN-B). Pendiente \
|
||||
de validación clínica."""
|
||||
requirements = ["pandas", "numpy", "scipy", "scikit-learn", "statsmodels", "pgmpy", "lifelines", "mpmath"]
|
||||
# Its figures are answered per clinical scenario (`/cama/modelo/recurrencia`); the cycle does not score each member.
|
||||
batch_estimates = false
|
||||
|
||||
[config.recurrence]
|
||||
horizons = [12, 36, 60] # months
|
||||
|
||||
@@ -52,6 +52,9 @@ class Scenario:
|
||||
# What the model's number is (`[estimand]`): `quantity`, `description`, `outcome`, `index_date`, `horizons_unit`;
|
||||
# what a screen shows next to each risk. How its interval is computed is the version's report's, not the screen's.
|
||||
estimand: dict = field(default_factory=dict)
|
||||
# Whether the cycle scores every member of the cohort with the version in production (`batch_estimates`); off for a
|
||||
# model whose answers are per clinical scenario, not a risk per member.
|
||||
batch_estimates: bool = True
|
||||
|
||||
@classmethod
|
||||
def from_toml(cls, path: str | Path) -> "Scenario":
|
||||
@@ -62,7 +65,7 @@ class Scenario:
|
||||
modules=tuple(import_module(name) for name in found["modules"]), config=found["config"],
|
||||
folder=path.parent, requirements=tuple(found.get("requirements", ())),
|
||||
tables={name: found[name] for name in found.get("settings_tables", ())} or None,
|
||||
estimand=dict(found.get("estimand", {})))
|
||||
estimand=dict(found.get("estimand", {})), batch_estimates=bool(found.get("batch_estimates", True)))
|
||||
|
||||
@classmethod
|
||||
def load(cls, domain: str, scenario: str) -> "Scenario":
|
||||
|
||||
Reference in New Issue
Block a user