An end-to-end Machine Learning web application predicting heart disease risk with a high recall rate using Random Forest. Built during my AnalystLab Africa internship.
CardioCheck AI: Interactive Cardiac Risk Predictor
CardioCheck AI is an interactive, production-grade clinical web application designed to bridge the gap between machine learning models and real-world clinical utility. Built as an AnalystLab Africa Capstone project, the platform exposes a machine learning model trained on the famous UCI Cleveland Heart Disease dataset, allowing clinicians to input 13 distinct patient metrics and receive visual risk assessments in real-time.
🚀 Live Demo
Experience the interactive web application live on Hugging Face Spaces:
👉 CardioCheck AI Live Space
🛠️ Tech Stack & Architecture
Machine Learning Core: Scikit-Learn (heart_model.pkl), serialized scaling pipeline (scaler.pkl)
Data Engineering: Pandas, NumPy
Interactive UI Framework: Streamlit (Python)
Deployment Platform: Hugging Face Spaces (Cloud-hosted)
🎯 Key Engineering & Testing Milestones
This project went far beyond basic model deployment. During the validation phase, rigorous test cases were designed to audit safety, consistency, and fairness.
1. UI-to-Backend Pipeline Validation
Objective: Ensure the web form safely parses $13$ human-friendly inputs, converts categorical variables into numerical matrices, scales the array using the identical training scaler ($z = \frac{x - \mu}{\sigma}$), and generates a runtime assessment without dropping features.
Reference Output: Verbatim: Screenshot 2026-06-26 165605.png confirms clean end-to-end data processing on initialization.
2. Label Inversion Resolution
Insight: During initial testing, a class label mismatch was detected where the model output mathematically flipped the diagnostic state (e.g., classifying a severe profile as "low-risk").
Fix: Successfully implemented UI-layer correction logic ($\text{risk\_percentage} = 100 - \text{calculated\_probability}$) to realign display elements with raw clinical truth without modifying the frozen model weights.
3. Baseline Consistency & Safety Testing
Objective: Prove mod …