← Back

Heart Disease Prediction System

Complete
Why

Why

Deciding who should be sent for an angiogram and who can safely go home is a high-stakes call that clinics must make from limited information. I wanted to build a decision-support tool for this scenario: a model that accurately separates patients with and without heart disease, paired with an interactive dashboard that lets clinicians and patients explore the prediction themselves.


How

How

Trained the model on 2,000 synthetic patient records patterned on the UCI Machine Learning Repository Heart Disease dataset, so no real patient information was used. I benchmarked a random forest against a logistic regression baseline and selected the random forest for its higher ROC AUC. Chest pain type, age, ST depression, maximum heart rate, and sex drive the predictions, which I examined by visualizing a decision tree from the model. I then built a Streamlit dashboard with pages for trying a patient, understanding the model, adjusting the decision threshold, reviewing performance, and reading my analysis notes.


Results

Results

The random forest achieved an AUC of 0.94, outperforming the logistic regression baseline. The "Try a patient" feature lets users enter their own information and see a prediction. The dashboard is a demonstration only, as it uses synthetic data and is not intended for real medical decisions, but it shows how machine learning can automate parts of the patient screening process.