Source: https://jubileejoyzirebwa.com/case-studies/final-year-project/
Canonical: https://jubileejoyzirebwa.com/case-studies/final-year-project/

[Work](https://jubileejoyzirebwa.com/work/)

# Final-year project

Retrospective machine-learning stratification of a Brugada-suspect cohort into SCN5A-mediated genetic architecture classes using ICD-10 encoded hospital trajectories

The project used genomics-linked hospital episode material to ask whether historical hospital-coded trajectories could support exploratory stratification in a Brugada-suspect research cohort.

[![Analytical design diagram for the final-year project.](https://jubileejoyzirebwa.com/_astro/analytical-design.HRFt554j_7nqio.webp)](https://jubileejoyzirebwa.com/_astro/analytical-design.HRFt554j.png)

Analysis design: cohort, hospital-event features, model comparison.

## What I was asked

The project asked whether pre-sequencing hospital-coded trajectories could describe useful signal in a Brugada-suspect cohort, and whether that signal was strong enough to support careful retrospective stratification.

## What I did

1. **Cohort**

   Pre-sequencing hospital episode records
2. **Features**

   ICD/OPCS groupings, temporal windows and utilisation features
3. **Observability controls**

   Record depth, available history and sparse coding
4. **Split**

   Imputation, scaling and encoding were fitted from training data only.
5. **Models**

   Logistic regression, random forest and shallow neural-network baselines
6. **Review**

   Thresholding, repeated split checks, model metrics, feature-effect outputs and subgroup/fairness review

## What it changed

The available hospital record supported a careful exploratory analysis, but not reliable individual classification. The strongest outcome was the workflow itself and the judgement used to recognise when sparse, unevenly observed signal was not strong enough to carry a larger claim.

### Testing a second hospital-code representation

After the dissertation, I returned to one narrower question: had the grouped HES representation hidden a small amount of promoter-linked signal that a different encoding could expose? I set up a staged mutual information screen rather than opening an unrestricted feature search.

The first stage tested individual binary hospital-code features with family-wise error control. None passed the declared threshold. The second stage then asked a more practical question: did any complete binary representation improve group-aware prediction beyond a prevalence-only reference? The average log-loss gains were negative, both for HES alone and when the declared nuisance variables were included.

The result did not support progressing to the planned dosage screen. I closed the lane at that point rather than expanding the search until something looked interesting. The useful outcome was a tested negative result.

Academic result

Dissertation write-up component: 83%. Wider Undergraduate Project module: 82, A, 30 credits.

Dates

2025 to 2026

Research context

Exploratory Brugada-suspect work using genomics-linked hospital episode material inside an approved secure research environment.

- [Code](https://github.com/JJZirebwa/brugada-hospital-trajectories)
- [Dissertation overview](https://jubileejoyzirebwa.com/documents/Jubileejoy_Zirebwa_Dissertation_Overview.pdf)
- [Academic record](https://jubileejoyzirebwa.com/academic/)

## Further artefacts

[![Cohort architecture chart from the dissertation overview.](https://jubileejoyzirebwa.com/_astro/cohort-architecture.CQKDXjVo_VssYn.webp)](https://jubileejoyzirebwa.com/_astro/cohort-architecture.CQKDXjVo.png)

Cohort and target architecture used to frame the analysis.

[![Observability depth chart showing record-history and code-history coverage.](https://jubileejoyzirebwa.com/_astro/observability-depth.kTelgr58_ZkcwQ6.webp)](https://jubileejoyzirebwa.com/_astro/observability-depth.kTelgr58.png)

Observability checks made record depth part of the method, not an afterthought.

[![Bar chart showing final compact feature-domain structure.](https://jubileejoyzirebwa.com/_astro/feature-domain-summary.iezxf6K4_XUenk.webp)](https://jubileejoyzirebwa.com/_astro/feature-domain-summary.iezxf6K4.png)

Compact feature-domain structure across ventricular severity, conduction, syncope, pathway proxy and observability.

[![Compact model-family comparison across balanced accuracy, ROC AUC, PR AUC and probability error.](https://jubileejoyzirebwa.com/_astro/model-performance.wImg_A6M_19YTs5.webp)](https://jubileejoyzirebwa.com/_astro/model-performance.wImg_A6M.png)

Model-family comparison across interpretable, tree-based and shallow neural-network baselines.

[![Random forest feature stability chart across repeated splits.](https://jubileejoyzirebwa.com/_astro/rf-feature-stability.C4Rmn8oT_Z1lNTKB.webp)](https://jubileejoyzirebwa.com/_astro/rf-feature-stability.C4Rmn8oT.png)

Feature-stability review helped test whether signal was stable enough to discuss.

[Clinical Informatics Next piece of work](https://jubileejoyzirebwa.com/projects/clinical-informatics/)
