A machine learning based web application that predicts the risk level of heart disease using clinical data and ECG signal analysis. The system combines multiple trained models to provide accurate risk predictions through a simple web interface.
Heart disease is one of the leading causes of death worldwide. Early prediction and diagnosis can help reduce risks and improve treatment outcomes.
This project uses machine learning models trained on clinical parameters and ECG signals to predict the probability of heart disease and classify patients into risk categories.
The application provides a user-friendly web interface where users can upload data and receive predictions instantly.
-
Predicts heart disease risk level
-
Uses both clinical data and ECG signal analysis
-
Fusion model combines multiple predictions
-
Web interface built with Flask
-
Multiple risk categories:
- Low Risk
- Medium Risk
- High Risk
- Critical Risk
- Python
- Flask
- TensorFlow / Keras
- Scikit-Learn
- NumPy
- Joblib
- HTML / CSS
heart-disease-prediction
│
├── app/
│ ├── static/
│ │ └── style.css
│ │
│ ├── templates/
│ │ ├── index.html
│ │ ├── result.html
│ │ └── error.html
│ │
│ └── app.py
│
├── dataset/
│
├── models/
│ ├── fusion_model.py
│ ├── train_clinical_model.py
│ └── train_ecg_model.py
│
├── model_utils.py
├── .gitignore
└── README.md
Clone the repository
git clone https://github.com/Subhaashree06/heart-disease-prediction.git
Move into the project directory
cd heart-disease-prediction
Create virtual environment
python -m venv venv
Activate environment
Windows
venv\Scripts\activate
Install dependencies
pip install -r requirements.txt
Start the Flask server:
python app.py
Open the browser and go to:
http://127.0.0.1:5000
Upload the input data to receive the prediction result.
The model classifies patients into the following risk categories:
| Label | Risk Level |
|---|---|
| 0 | Low Risk |
| 1 | Medium Risk |
| 2 | High Risk |
| 3 | Critical Risk |
- Improve model accuracy with larger datasets
- Add real-time ECG signal analysis
- Deploy the application on cloud platforms
- Add user authentication for healthcare professionals
Subhaashree Jagannathan
GitHub: https://github.com/Subhaashree06
Give it a star ⭐ on GitHub!