A training run takes every model; the public cohorts' code lives with the tests

This commit is contained in:
Roberto Treviño
2026-11-29 21:12:17 -06:00
parent 3a749ba8d1
commit a9945bc021
12 changed files with 225 additions and 203 deletions
+2 -3
View File
@@ -20,10 +20,9 @@ from pgmpy.structure_score import BDeu
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import train_test_split
from models.cama.recurrence.cohorts import Cohort, at_horizon
from models.cama.recurrence.cohorts import HORIZONS, Cohort, at_horizon
from models.factors import variable_of
HORIZONS = (12, 36, 60) # months
SEED = 42
TEST_SIZE = 0.3
ESS = 10 # BDeu's equivalent sample size, also the CPT's pseudo-count
@@ -32,7 +31,7 @@ ALPHA_PREFILTER, ALPHA_IN, ALPHA_OUT = 0.10, 0.10, 0.15
MAX_STEPS = 200
COX_PENALIZER = 0.05
COX_MIN_COUNT = 10 # a Cox dummy needs this many patients on each side
N_BOOTSTRAP = {"metabric": 100, "scanb": 40, "site": 40}
N_BOOTSTRAP = {"site": 40}
# ---------------------------------------------------------------- logistic regression