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 \
|
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."""
|
de validación clínica."""
|
||||||
requirements = ["pandas", "numpy", "scipy", "scikit-learn", "statsmodels", "pgmpy", "lifelines", "mpmath"]
|
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]
|
[config.recurrence]
|
||||||
horizons = [12, 36, 60] # months
|
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 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.
|
# 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)
|
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
|
@classmethod
|
||||||
def from_toml(cls, path: str | Path) -> "Scenario":
|
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"],
|
modules=tuple(import_module(name) for name in found["modules"]), config=found["config"],
|
||||||
folder=path.parent, requirements=tuple(found.get("requirements", ())),
|
folder=path.parent, requirements=tuple(found.get("requirements", ())),
|
||||||
tables={name: found[name] for name in found.get("settings_tables", ())} or None,
|
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
|
@classmethod
|
||||||
def load(cls, domain: str, scenario: str) -> "Scenario":
|
def load(cls, domain: str, scenario: str) -> "Scenario":
|
||||||
|
|||||||
Reference in New Issue
Block a user