Skip to content

Repository files navigation

Cardiac Risk Management

Cardiac Risk Assessment

A Streamlit web app that estimates heart disease risk from 13 patient vitals and test results, using a Random Forest Classifier trained on a Kaggle heart disease dataset.

Project structure

File Purpose
Machine_Learning_-_Random_Forest_Classifier_-_Heart_Disease.ipynb Original Colab notebook: data loading, EDA, train/test split, Random Forest training, evaluation, and model export via joblib.
heart_disease_model.joblib The trained model, exported from the notebook.
app.py Streamlit frontend that loads the model and serves live predictions.
requirements.txt Python dependencies.

Running locally

pip install -r requirements.txt
streamlit run app.py

Design notes

The app is styled as a "cardiac monitor" dashboard: a live ECG waveform in the header idles calmly, then reflects the prediction result \u2014 a steady green trace for low risk, a fast red trace for elevated risk. Inputs are grouped into clinical sections (Demographics, Vitals & Labs, Cardiac Tests) rather than a flat form, and results include the model's confidence percentage plus a feature importance breakdown.

Notes on the data

All 13 input features were already numerically encoded in the source dataset (no separate encoder was fit during training), so app.py maps human-readable dropdown options directly to the same integer codes seen during training. The exact meaning of a couple of coded fields (e.g. Thallium Stress Test Result) follows the most common convention for this dataset \u2014 worth double-checking against your own data dictionary if exact category labels matter for grading.

This tool is an educational project and is not medical advice.

About

A Streamlit web app that estimates heart disease risk from 13 patient vitals and test results, using a Random Forest Classifier trained on a Kaggle dataset.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages