Dejar sin entrenar ni puntuar los modelos ocultos y preparar los de CIN 3+

This commit is contained in:
2026-12-04 12:47:07 -06:00
parent bc78cb52c1
commit ccdfe06261
2 changed files with 12 additions and 4 deletions
+7
View File
@@ -215,6 +215,13 @@ MODELS = {
incidence_features=("cytology", "hpv_positive"), history=_REFERRAL),
Pim("cin2_pim_post_treatment", "cacu_cohort_post_treatment", cacu.CIN2_PLUS,
cacu.KPNC_3, strata=(), incidence_features=("cytology", "hpv_positive")),
# Hidden (core.models.HIDDEN): CIN3+ needs biopsies graded apart from CIN2.
Pim("cin3_pim", "cacu_cohort_surveillance", cacu.CIN3_PLUS, cacu.KPNC,
strata=("hpv_positive",), incidence_features=("cytology",),
predict_at="last_screening_cytology"),
Pim("cin3_pim_post_colposcopy", "cacu_cohort_post_colposcopy", cacu.CIN3_PLUS,
cacu.KPNC_3, strata=("referral_grade",),
incidence_features=("cytology", "hpv_positive"), history=_REFERRAL),
Logistic("cin2_logistic", "cacu_cohort_surveillance", cacu.CIN2_PLUS),
Spec("survival", "cacu_cohort_survival", ("age_group", "cytology", "hpv"),
survival_covariates, borders=(0, 12, 36, 60), cap_months=60,
+5 -4
View File
@@ -11,6 +11,7 @@ import mlflow.pyfunc
import pandas as pd
from joblib.externals.loky import get_reusable_executor
from core.cacu import visibility
from persistance import gold, registry
@@ -43,12 +44,12 @@ class Jobs:
return f"{self.domain}_events"
def routine(self) -> list[str]:
"""The models a train run takes when none is named: all of them."""
return list(self.models)
"""The models a train run takes when none is named: all but the hidden ones."""
return [n for n in self.models if visibility.model(self.registered(n))]
def scored(self) -> list[str]:
"""The models a score run takes when none is named: all of them."""
return list(self.models)
"""The models a score run takes when none is named: all but the hidden ones."""
return self.routine()
def registered(self, name: str) -> str:
return f"{self.domain}.{name}"