Skip to content

Commit bdf7ec3

Browse files
Nick  VaccarelloNick  Vaccarello
authored andcommitted
docs(NEXT_STEPS): mark Training data v0.2 complete; add links to generator, pipeline, and metrics report
1 parent 7278986 commit bdf7ec3

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

medical_diagnosis_model/NEXT_STEPS.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Acceptance:
6060
## Immediate (week 1–2)
6161

6262
- Define schema mapping
63+
6364
- Single source of truth for: symptoms (IDs/labels), vitals (units/ranges), labs (normalization), demographics, context (season/exposure), unknown/NA encoding.
6465
- Canonical ontology & synonym map for symptoms; explicit schema versioning and change log.
6566
- Acceptance criteria:
@@ -74,6 +75,16 @@ Acceptance:
7475
- [x] Validator CLI `data/validate_cases.py` passes on samples; `jsonschema` added to requirements.
7576
- [x] Command: `python data/validate_cases.py data/samples/cases_v0.1.jsonl` prints `Validation passed: 0 errors`.
7677
- References: `data/README.md`, `data/case.schema.json`, `data/dictionaries/`, `data/samples/`, `data/validate_cases.py`.
78+
79+
- [x] Training data v0.2 (balance + explicit negatives)
80+
- Goal: reduce early UTI bias; encode negative GU evidence in respiratory cases and vice‑versa; strengthen URI patterns and mild/early variants.
81+
- Acceptance criteria:
82+
- [x] Generator emits JSONL to schema with balanced class counts (or class weights are configured). See `data/generate_v02.py``data/v02/cases_v02.jsonl`.
83+
- [x] Respiratory cases explicitly mark `dysuria=0`, `frequency=0`; GU cases often mark `cough=0`, `rhinorrhea=0`, `congestion=0`.
84+
- [x] URI patterns included (cough + rhinorrhea + congestion ± low fever, sore throat); GU patterns (dysuria + frequency).
85+
- [x] Mild/early and atypical variants present; unknowns used appropriately.
86+
- [x] Dataset versioned as v0.2; training pipeline `tools/train_pipeline.py` writes model to `models/enhanced_medical_model_v02.json`.
87+
- [x] Re‑train + calibration performed; quick confusion/ECE report at `reports/metrics_v02.json` shows improved Resp vs GU separation.
7788
- Label policy
7889
- For each disease: criteria for “confirmed” (ICD‑10 + test) vs “presumptive”; clinician adjudication rules.
7990
- Acceptance criteria:
@@ -103,6 +114,7 @@ Acceptance:
103114
- Acceptance criteria:
104115
- Config toggles in `configs/training.yaml` enable Adam/L2/dropout; seed fixed.
105116
- Training summary logs include optimizer, regularization, and early stopping status.
117+
- Class weighting or balanced sampling applied if class counts are imbalanced; documented in DATA_CARD.
106118
- Metrics & calibration
107119
- AUROC, AUPRC, F1, Top‑k, confusion per class.
108120
- Reliability diagrams + ECE; re‑tune temperature on held‑out set; subgroup calibration (age/sex/season). Add drift monitors for class priors and feature distributions.
@@ -532,14 +544,15 @@ medical_diagnosis_model/
532544
## First actionable tasks (suggested order)
533545

534546
1. Create `configs/clinical_schema.yaml` with symptom/vitals/labs mappings.
535-
2. Write `docs/label_policy.md`; wire gold labels (confirmed vs presumptive) into dataset.
536-
3. Build PHI‑safe ingestion CLI: de‑identify, normalize units, audit logs → `data/clean/`.
537-
4. Implement patient‑ and time‑based splits with stratification; add class weighting.
538-
5. Add training toggles (Adam, L2, dropout) and fixed seeds via `configs/training.yaml`.
539-
6. Add metrics module (AUROC/AUPRC/F1/Confusion) and reliability diagram + ECE.
540-
7. Expand rules: Centor + CURB‑65; add “need more info” if entropy/confidence threshold.
541-
8. Build batch CLI to score CSV and emit results JSON/CSV.
542-
543-
9. Implement adaptive questioning selector stub (`backend/selector/eig_selector.py`) with unit tests on toy distributions; wire a no‑UI CLI demo.
547+
2. Regenerate training data v0.2 (balanced counts or class weights; explicit negative GU for respiratory and vice‑versa; URI patterns; mild/early/atypical). Retrain + recalibrate; update DATA_CARD.
548+
3. Write `docs/label_policy.md`; wire gold labels (confirmed vs presumptive) into dataset.
549+
4. Build PHI‑safe ingestion CLI: de‑identify, normalize units, audit logs → `data/clean/`.
550+
5. Implement patient‑ and time‑based splits with stratification; add class weighting.
551+
6. Add training toggles (Adam, L2, dropout) and fixed seeds via `configs/training.yaml`.
552+
7. Add metrics module (AUROC/AUPRC/F1/Confusion) and reliability diagram + ECE.
553+
8. Expand rules: Centor + CURB‑65; add “need more info” if entropy/confidence threshold.
554+
9. Build batch CLI to score CSV and emit results JSON/CSV.
555+
556+
10. Implement adaptive questioning selector stub (`backend/selector/eig_selector.py`) with unit tests on toy distributions; wire a no‑UI CLI demo.
544557

545558
> Tip: keep a changelog and version datasets/runs (seed, config, code commit) for reproducibility.

0 commit comments

Comments
 (0)