Skip to content

Latest commit

 

History

History
120 lines (91 loc) · 6.62 KB

STUDENT_GUIDE.md

File metadata and controls

120 lines (91 loc) · 6.62 KB

Student guide — the model development challenge

Your role today: you are the research team. At the response evaluation of the first TACE cycle in hepatocellular carcinoma, clinicians must decide continue TACE vs switch to systemic therapy — and no reliable tool supports that call. Your job is to build one from CT radiomics + clinical data, and to find out honestly whether it works — then defend it in a 5-slide presentation.

Your model must make two different promises, and you will test them separately: a predictive claim (it discriminates who will carry the progression label — tested with ROC-AUC and precision-recall against a clinical-only baseline) and a prognostic claim (its risk score identifies patients with worse survival — tested with Kaplan–Meier curves and the concordance index, both explained in the notebook).


Step 1 — Open the notebook (2 min)

You only need a browser and a Google account — nothing to install.

  1. Go to the repository: github.com/npapan69/ESAC-workshop, branch dev
  2. Click the "Open in Colab" badge at the top of the README.
  3. In Colab, immediately click File → Save a copy in Drive. ⚠️ Work in your copy — otherwise your edits are lost when the tab closes.

(Prefer to run locally? Any Python ≥3.10 with pandas scikit-learn matplotlib lifelines jinja2 works: git clone -b dev https://github.com/npapan69/ESAC-workshop and open hackathon/WAW_TACE_hackathon_starter.ipynb.)

Step 2 — Run the setup and meet the data (~20 min)

Run Sections 0–3 from top to bottom (▶ button or Shift+Enter). They download the data from the repository and walk you through it. You should see:

  • the clinical table: 233 patients — demographics, etiology, labs, lesion descriptors, the first-TACE LI-RADS response grade, and the outcomes (progression, survival_time, death),
  • the radiomics table: thousands of pre-extracted features from the arterial (Art_) and portal-venous (Portal_) CT phases,
  • the merge and the train / held-out test split — from here on, the test set is touched once, at the end. That discipline is the challenge.

Note the class imbalance (~1 in 4 progresses): accuracy is a trap; the notebook uses ROC-AUC and precision-recall throughout.

Step 3 — Build and beat the baseline (~2 h)

Sections 4–9 carry the predictive claim. The notebook gives you working code at every step — your job is to improve it and to interrogate it:

section what happens your work
5 single-feature signal check see how weak individual features are
6 clinical-only baseline the number to beat — it already includes the response grade
7 + radiomics (cross-validated) feature reduction, model choice, imbalance handling — 🔨 exercises
8 held-out test evaluation ROC + confusion matrix at a clinically chosen threshold
9 feature importance do the top features make clinical sense, or smell like noise?

Keep the cross-validation honest: every choice (features, scaling, hyperparameters) happens inside the CV loop on the training set. If a result looks too good, hunt for the leak before you celebrate it — data leakage is the most common way these models lie.

How to work as a team: everyone runs Sections 0–6 together; then split — some push the classifier (7–9), some start the survival model (10) — and reconvene for the discussion (11).

Step 4 — The survival model and the hard questions (~1 h)

Section 10 builds the independent Cox model of overall survival: Kaplan–Meier curves, a clinical-only Cox baseline, concordance on the held-out test set. The 🔨 exercises ask the questions that matter — including one about a worked cell whose plot looks suspiciously beautiful. In this challenge, treat every result that looks too good as a question, not a gift.

Section 11 is the part that matters most: the critical discussion. Fill in the mini TRIPOD-AI-style checklist (missing-data handling, feature selection, validation split, assumptions tested) and take a position: could this model support the continue-versus-switch decision? A model that classifies progression but does not stratify survival supports a different — and weaker — claim than it seems.

Finished early? — External validation

Ask a facilitator about the external cohort in data/hcc_tace_seg_external.csv: 104 TACE-treated HCC patients from another continent (HCC-TACE-Seg, TCIA/MD Anderson), processed with the identical radiomics pipeline and harmonized clinical variables. Evaluate your final, frozen model on it — no peeking, no re-tuning. Expect a performance drop from scanner and population shift; explaining why is worth more than the number itself.

Step 5 — The 5-slide presentation

A structure that works:

  1. The problem — the continue-vs-switch decision, and why a model might help.
  2. The model — your pipeline in one diagram: features → selection → model → validation.
  3. The evidence — ROC-AUC and precision-recall vs. the clinical-only baseline; the survival analysis.
  4. The features — what drives the predictions, and whether it makes clinical sense.
  5. The verdict — your TRIPOD-AI checklist highlights, the limitations you found, and what you would require before anyone trusts this model. (Spoiler: someone might audit it.)

Troubleshooting

problem fix
Colab badge gives an error The repo may not be public yet — ask a facilitator.
NameError / variable not defined The runtime restarted or a cell was skipped — Runtime → Run all fixes it (always safe; downloads are re-fetched automatically).
lifelines not found Rerun the first install cell (Section 0) — it takes ~30 s on Colab.
%pip install does nothing locally / No module named pip Your venv is uv-managed (no pip inside). From a terminal: uv pip install <package> — or run python -m ensurepip --upgrade once to make %pip work.
Cross-validation runs slowly Reduce the hyperparameter grid or the number of folds while exploring; do the full run once at the end.
Test-set AUC much lower than CV AUC That's not a bug — that's generalization. Report it honestly.

Rules of engagement: the data and this notebook are teaching material — models built here must never inform real clinical decisions. Data: WAW-TACE (Zenodo, CC-BY-4.0); external cohort: HCC-TACE-Seg (TCIA). Report honestly: a negative result, honestly demonstrated, is a good result.

A good modeller is their own first skeptic. Beat the baseline — then try to un-beat yourself. 🔬