Predicting PHQ-9 Depression Scores from Multi-Clinic EHR Data
Predicting depression severity from routine EHR data.
The target
PHQ-9: nine questions, each scored 0–3
Standard severity bands (Kroenke et al., 2001). Drag to explore.
The pipeline
Select a step to see what it does.
01The problem
Measuring depression severity normally needs a separate PHQ-9 visit, so patients often get flagged late.
02Approach & architecture
Led a UBC MDS capstone for GreenspaceHealth: engineered features from 140K+ multi-clinic encounters and built a calibrated, explainable model that predicts PHQ-9 severity without the questionnaire.
03Why the split matters
- training visit
- test visit
- test visit from a patient the model trained on
Figure 2. Leakage lab: 16 synthetic patients with 3–8 visits each, 20% held out for testing. An illustration of the method, not study data.
04Results & impact
Measured What the work shows
Processed 140K+ EHR encounters from several clinics into a modelling dataset and delivered a model with feature-importance reports to GreenspaceHealth as the UBC MDS capstone.
Expected Possible impact, not yet measured
The aim is to flag patients whose depression may be worsening between visits, using routine EHR data alone. That use has not been evaluated in a clinic.
05Lessons
Held-out splits matter more than model architecture in clinical ML — the early Random Forest looked deceptively strong until the validation strategy switched from held-out visits to held-out patients. The biggest practical win was investing in the data pipeline before the model: most of the accuracy gain came from feature engineering on the warehouse side, not from the temporal architecture itself.
—Stack
Done as my Master of Data Science capstone with GreenspaceHealth. Underlying patient data is confidential under research agreement and is not reproduced here — this case study covers methodology, role, and outcomes only.