Ernest Essien
Software Engineer at Amalitech
I believe you have to find your ikigai :)
Abstract
Can machine learning help predict diseases using real hospital data? I built [EpiScope](https://github.com/Grandkojo/EpiScope) to find out — training XGBoost models on 13,000+ patient records from a Ghanaian health facility and serving predictions via a Django REST Framework API. This is the talk I wish I had when learning XGBoost. Instead of clean datasets, I had to wrangle real hospital EAMS records: medications buried in free-text strings, ICD codes mixed into diagnosis fields, ages stored as "45 Year(s)", and missing data everywhere. I'll show you the real code, the real mistakes, and the lessons they taught me. ### What you'll learn - **XGBoost explained intuitively** — no PhD required, just a clear mental model - **Wrangling real-world hospital data with Pandas** — regex parsers for medication strings, ICD code extraction, handling missing demographics - **Feature engineering** — turning raw records into 15 meaningful features (age groups, temporal patterns, medication indicators, cost categories) - **The data leakage trap** — how my first model hit 100% accuracy by memorizing the answer key, and how SHAP helped me catch it - **Training with cross-validation** — StratifiedKFold, metrics beyond accuracy (AUC, precision, recall), and real feature importance results - **Serving the model via Django REST Framework** — from `.pkl` file to authenticated API endpoint with prediction logging - **Building a doctor feedback loop** — storing predictions, collecting clinician corrections, and retraining the model with real-world outcomes ### The story behind the numbers My first model (v1) scored 100% accuracy. I was thrilled — then suspicious. The ICD diagnosis codes I used as features were the same codes I used to create the target labels. The model was just memorizing. After removing the leak (v2), accuracy dropped to ~95% — but now it was *real*. That single mistake taught me more about ML evaluation than any tutorial. ### Who this is for ML beginners, data science enthusiasts, healthcare tech developers, and anyone curious about applying Python to real-world problems in Africa. All code is open-source (Apache 2.0) — you can build on it after the session.