A regression-based screening tool for neurological cancer mortality, trained on the IHME Global Burden of Disease (GBD) 2021 dataset, with an interactive widget interface intended as a low-cost, accessibility-first risk indicator — not a diagnostic.
Course: CSE 163 Intermediate Data Programming — University of Washington (Spring 2025) Authors: Aurora Liu · Noah Brown · Ru Li Status: Final project — CSE 163, Spring 2025
Neurological cancers (brain & CNS tumors) are among the most lethal cancers because they progress silently and require expensive imaging or invasive biopsy to detect. Early detection is the strongest predictor of survival, but advanced diagnostics are out of reach for a large fraction of the global population.
We asked: can we build a useful first-line risk estimator from demographic data alone? A model that runs in a browser and asks three questions could plausibly nudge high-risk individuals toward earlier screening — particularly in regions without easy access to MRI or neuro-oncology specialists.
- How does brain cancer mortality vary across age, sex, year, and Socio-Demographic Index (SDI) groups?
- What demographic factor most strongly predicts neurological-cancer mortality across countries, years, age groups, and sexes?
- Primary: can we accurately predict neurological-cancer mortality from demographic data alone (year, location, sex, age)?
- Source: IHME Global Burden of Disease (GBD) 2021
- Scope: 237 countries / regions, 2010–2021, neurological cancer mortality only
- Raw shape: ~500K rows × 16 columns
- Cleaned shape: ~173K rows × 6 columns after dropping unused identifiers and filtering to standard 5-year age bins (
age_id6–21)
The raw CSV is not committed to this repository (it is large and freely re-downloadable from IHME). The notebook fetches a working copy from a shared Google Drive at runtime via gdown; for a fresh download, see the IHME GBD Results Tool linked above.
- Drop redundant ID and CI columns (
cause_id,metric_id,upper,lower, …) - Filter to standard 5-year age bins
- One-hot encode
location_nameandsex_name - 80 / 20 train / test split
A RegressionMachine class wraps four scikit-learn regressors with a uniform fit / evaluate / inspect interface:
| Model | Hyperparameter search | Output |
|---|---|---|
| Ordinary Least Squares | none | MSE, R², top-10 coefficients |
| Lasso | LassoCV (5-fold) |
MSE, R², α, top-10 coefficients |
| Decision Tree | GridSearchCV over max_depth ∈ {10, 25, 50, 100} |
MSE, R², best depth |
| Random Forest | default RF (≈ 0.5 GB serialized model) | MSE, R², serialized via joblib |
A self-contained ipywidgets + ipyleaflet UI that:
- Asks the user for sex, age bracket, and country (clickable world map).
- Constructs a single-row inference frame in the exact format the trained Random Forest expects.
- Returns the user's predicted-deaths-per-year as a log-ratio against the global median, rather than as a raw number, so a non-expert reader can interpret it.
A small TestRegressionMachine class verifies output shape and key invariants (e.g. that location-based coefficients dominate the top 10).
| Model | MSE | R² |
|---|---|---|
| OLS | 23,921 | 0.660 |
| Lasso | 24,587 | 0.650 |
| Decision Tree (depth 100) | 324 | 0.995 |
| Random Forest | ≈ 1,330 | ≈ 0.99 |
Interpretation (with deliberate caution):
- The tree-based models look like silver bullets but are almost certainly overfitting the one-hot region encoding — every "Global", "WHO region", "Four world regions" row in the data is essentially memorized.
- The OLS and Lasso top-10 coefficients are dominated by location features (
Southeast Asia,East Asia and Oceania,Middle SDI,China, …), each with effects > 1,600 deaths. Age and sex never make the top 10. - In other words, raw demographic variables matter much less than where you live, which is itself a proxy for healthcare access, environmental exposure, and reporting completeness.
This is a real, important finding for a "demographic-only" screening tool: it learns access to diagnosis as much as it learns disease.
- Death counts are not population-normalized. A larger country contributes more raw deaths regardless of incidence rate.
- Diagnostic coverage varies by country. Low-SDI regions report fewer deaths because cases are underdiagnosed, not because incidence is lower — a clear bias in any model trained on these data.
- Three-question screening is not a diagnosis. The risk widget is explicitly framed as a context-builder, not a clinical decision tool.
.
├── README.md ← this file
├── requirements.txt ← Python dependencies
├── .gitignore
├── docs/
│ └── proposal.pdf ← original CSE 163 project proposal
├── notebooks/
│ └── analysis.ipynb ← end-to-end notebook (data → models → widget)
└── src/
└── project.py ← clean module version of the analysis
This project was developed in Google Colab, which is the easiest environment to re-run it in (the interactive widgets, the geospatial map layer, and the dataset download all work there out-of-the-box).
Option A — Open in Colab (recommended):
- Upload
notebooks/analysis.ipynbto your Google Drive, or open it directly via Colab's GitHub integration. - Run all cells. The notebook will download the GBD CSV and the widget assets on the first run.
Option B — Run locally:
git clone https://github.com/ruuuuthful/Group-9-Final-Project-Dataset.git
cd Group-9-Final-Project-Dataset
pip install -r requirements.txt
jupyter lab notebooks/analysis.ipynbA few cells reference Colab-only helpers (google.colab.files, google.colab.drive); these will need to be adapted or skipped when running locally.
This was a genuine team project; the breakdown below reflects each member's primary focus.
- Ru Li — Exploratory data visualization (Research Question 1: SDI / age / year / sex bar plots) and regression modeling (
RegressionMachineclass covering OLS, Lasso, and Decision Tree, including hyperparameter tuning and top-10 coefficient analysis). - Aurora Liu — Data acquisition and preprocessing pipeline (
prep_data), including pulling the raw GBD CSV and producing the cleaned analysis-ready frame. - Noah Brown — Random Forest training and serialization, plus contributions to model evaluation across the pipeline.
All authors contributed to writing the report and to discussions of model interpretation and limitations.
CSE 163 staff at the University of Washington (Spring 2025) for the course infrastructure and the data-programming methods this project builds on. IHME for making the GBD data publicly available.