Back to Projects
F
Data Science / Analysis

Fibroid Risk Prediction

ML Engineer (Research)

XGBoostLightGBMSMOTESHAPScikit-learnPython

About the Project

A research project developing a machine learning model to predict uterine fibroid presence from clinical and demographic data, backing an academic paper of the same name. The dataset is 49 anonymized patient records — 37 negative and 12 positive, a 3:1 imbalance on top of an already tiny sample. Raw features (age, height, weight, blood pressure, symptom text) are engineered into structured predictors, then classified with gradient boosting under 5-fold cross-validation with SHAP interpretability for clinical transparency.

What It's Made Of

Feature engineering

49 records · derived clinical predictors

Turning raw clinical fields into usable predictors: deriving body-composition and blood-pressure features from age, height, weight and readings, and parsing free-text symptom descriptions into structured signals. With 49 records, every engineered feature has to justify itself — more predictors on this sample size buys variance, not accuracy.

Modelling & validation

XGBoost · LightGBM · 5-fold CV · SMOTE

Gradient-boosted classification under 5-fold cross-validation, reaching 94% mean accuracy (±4.9%) and 0.88 mean F1. SMOTE addresses the 3:1 imbalance, and the original and augmented models are reported side by side rather than only the augmented result, because presenting just the better number would misrepresent what the sample supports.

Interpretability

SHAP · per-prediction attribution

SHAP attribution so a clinician can see which features drove an individual prediction rather than being handed a probability. On a clinical question with a tiny sample, explainability is not a nice-to-have — it is the only way a reviewer can judge whether the model learned medicine or learned the dataset.

Reproducible paper artifacts

Generated methodology, results, figures

The academic paper's methodology section, results tables and figures are generated from the pipeline itself rather than transcribed by hand, so a rerun updates the paper and the numbers in it cannot drift apart from the code that produced them.

Key Highlights

  • Achieved 94% mean accuracy (±4.9%) and 0.88 mean F1 under 5-fold cross-validation on gradient-boosted trees
  • Engineered structured predictors out of raw clinical fields — deriving body-composition and blood-pressure features, and parsing free-text symptoms into usable signals
  • Applied SMOTE oversampling and reported original-versus-augmented model comparisons side by side rather than only the augmented result
  • Implemented SHAP explainability so a clinician can see which features drove an individual prediction
  • Generated the paper's methodology, results, and figures reproducibly from the pipeline itself

Technical Challenges

The honest difficulty here is the sample size, and I'd rather state it than hide behind the headline accuracy. With 12 positive cases, a single fold contains two or three of them — so precision swings between 0.67 and 1.00 across folds (±16%) even while mean accuracy sits at 94%. That variance is the real result: the model is a credible signal that these clinical features carry predictive information, not a deployable diagnostic. Reporting the fold-level spread and the original-versus-augmented comparison, rather than the best number, is what keeps the finding defensible.