Every model trains on the site: EEG age curves on the children with TEA ruled out, recurrence on the site's patients (St. Gallen subtype), and the EEG–ADOS-2 association

This commit is contained in:
Roberto Treviño
2026-11-28 21:28:36 -06:00
parent 924f662a21
commit 53e6f77c9e
10 changed files with 700 additions and 81 deletions
+5
View File
@@ -53,6 +53,11 @@ class Jobs:
spec, as_of = self.models[name], as_of or date.today()
if spec.cohort is None: # trained on reference data: it writes its own reports
fitted, metrics, found = spec.train(None, as_of)
elif getattr(spec, "reports", False): # trained on its cohort, with its own reports
events = gold.timelines(self.events, spec.cohort, as_of)
if events.empty:
raise EmptyCohort(f"{self.registered(name)}: nobody in {spec.cohort}")
fitted, metrics, found = spec.train(events, as_of)
else:
events = gold.timelines(self.events, spec.cohort, as_of)
if events.empty: