You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: medical_diagnosis_model/NEXT_STEPS.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,14 @@ Acceptance:
115
115
- Config toggles in `configs/training.yaml` enable Adam/L2/dropout; seed fixed.
116
116
- Training summary logs include optimizer, regularization, and early stopping status.
117
117
- Class weighting or balanced sampling applied if class counts are imbalanced; documented in DATA_CARD.
118
+
119
+
- Transformer baseline
120
+
- Implement a tiny Transformer classifier as a comparative baseline to the current MLP.
121
+
- Acceptance criteria:
122
+
-`foundational_brain/nano_transformer.py` with tokenization (symptom IDs), embeddings, 2–4 attention blocks, and classifier head; trained with cross‑entropy.
123
+
- CLI to train/evaluate on v0.2 data and save metrics: `python -m foundational_brain.nano_transformer --jsonl medical_diagnosis_model/data/v02/cases_v02.jsonl`.
124
+
- Report comparing MLP vs Transformer on accuracy, confusion, and ECE written to `medical_diagnosis_model/reports/transformer_baseline.json`.
125
+
- README snippet explaining differences (sequence modeling, attention) and when Transformer helps.
118
126
- Metrics & calibration
119
127
- AUROC, AUPRC, F1, Top‑k, confusion per class.
120
128
- Reliability diagrams + ECE; re‑tune temperature on held‑out set; subgroup calibration (age/sex/season). Add drift monitors for class priors and feature distributions.
@@ -164,9 +172,11 @@ Acceptance:
164
172
## Ops & tooling (parallel)
165
173
166
174
- Experiment tracking & configs
167
-
- YAML configs, fixed seeds, run logs; simple experiment registry.
175
+
- YAML configs, fixed seeds, run logs; MLflow for runs/artifacts; Hydra for hierarchical configs.
168
176
- Acceptance criteria:
169
-
- Each run saves `configs/*.yaml`, seed, code commit, and metrics in `runs/{timestamp}/`.
177
+
- MLflow tracking enabled locally: params/metrics/artifacts (model, reports) recorded per run under `mlruns/`.
178
+
- Hydra‑based configs under `medical_diagnosis_model/configs/` with overrides for optimizer, regularization, and model type (mlp|transformer).
179
+
- Each run logs code commit hash, dataset version, seed; outputs in `runs/{timestamp}/` include a summary JSON and links to MLflow artifacts.
170
180
- A summary index CSV lists runs with key metrics for comparison.
171
181
- Batch CLI
172
182
- Score CSV/JSONL → outputs with predictions, differentials, confidence, flags.
@@ -557,5 +567,7 @@ medical_diagnosis_model/
557
567
9. Build batch CLI to score CSV and emit results JSON/CSV.
558
568
559
569
10. Implement adaptive questioning selector stub (`backend/selector/eig_selector.py`) with unit tests on toy distributions; wire a no‑UI CLI demo.
570
+
11. Add nano‑Transformer baseline (`foundational_brain/nano_transformer.py`) + CLI; compare vs MLP and write `reports/transformer_baseline.json`.
571
+
12. Wire MLflow tracking and Hydra configs for both MLP and Transformer runs; log params/metrics/artifacts and enable easy overrides.
560
572
561
573
> Tip: keep a changelog and version datasets/runs (seed, config, code commit) for reproducibility.
0 commit comments