https://github.com/roushankhalid/structural-heart-disease
This project uses machine learning on ECG data to predict Structural Heart Disease (SHD), with fine-tuned models, explainable AI for feature insights, and an LLM-powered recommendation system to support clinical decision-making.
https://github.com/roushankhalid/structural-heart-disease
data-cleaning-and-preprocessing fine-tuning llm machine-learning-algorithms python3 recommendation-system
Last synced: about 1 month ago
JSON representation
This project uses machine learning on ECG data to predict Structural Heart Disease (SHD), with fine-tuned models, explainable AI for feature insights, and an LLM-powered recommendation system to support clinical decision-making.
- Host: GitHub
- URL: https://github.com/roushankhalid/structural-heart-disease
- Owner: RoushanKhalid
- Created: 2025-09-16T06:09:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T09:58:58.000Z (9 months ago)
- Last Synced: 2025-09-30T11:42:02.845Z (9 months ago)
- Topics: data-cleaning-and-preprocessing, fine-tuning, llm, machine-learning-algorithms, python3, recommendation-system
- Language: Jupyter Notebook
- Homepage:
- Size: 4.24 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Predicting Structural Heart Disease from ECG Data Using Machine Learning and Explainable Recommendation System
## 📌 Overview
Structural Heart Disease (SHD) includes conditions such as valve disorders, reduced ventricular function, and wall thickening.
Echocardiography is the gold standard for diagnosis but is costly, requires expertise, and has limited availability.
This project leverages **electrocardiogram (ECG)-derived features** with **machine learning** to predict **echocardiogram-confirmed SHD** and introduces an **explainable recommendation system** to support clinical decision-making.
## 🎯 Objectives
- 🧠 **Predictive Modeling:** Build and fine-tune ML models for binary classification of SHD.
- ⚖️ **Model Benchmarking:** Compare different algorithms (Logistic Regression, Random Forest, XGBoost, Neural Networks).
- 🔎 **Explainability:** Apply SHAP/LIME to identify ECG features driving predictions.
- 💬 **Recommendation System:** Use LLMs to explain model outputs in natural language and suggest clinical next steps.
## 📂 Dataset
Dataset: **Detecting Echocardiogram-Confirmed Structural Heart Disease from ECGs 1.0.0**
**Features include:**
- **Demographics:** Age, sex, acquisition year
- **ECG Features:** Ventricular rate, atrial rate, PR interval, QRS duration, QTc interval
- **Echocardiography Flags (binary):**
- Reduced LVEF (≤ 45%)
- Valve stenosis/regurgitation
- Wall thickening
- Right ventricular dysfunction
- Pericardial effusion
- Pulmonary hypertension
- **Echocardiography Measurements (continuous):**
- Ejection fraction
- Pulmonary artery pressure
- Valve severity levels
- Septal & wall thickness
- **Target:** `shd_moderate_or_greater_flag` (0 = no SHD, 1 = SHD present)
👉 The main focus is **binary classification**.
## ⚙️ Methodology
1. **Data Preprocessing:** Handle missing values, encode categorical features, standardize ECG variables
2. **Exploratory Data Analysis:** Study feature distributions & correlations with SHD outcomes
3. **Model Development:** Train and fine-tune multiple ML models
4. **Evaluation Metrics:** ROC-AUC, F1-score, precision, recall
5. **Explainability Layer:** Use SHAP/LIME for model interpretation
6. **Recommendation System:**
- Convert model outputs into natural language explanations
- Provide suggestions for follow-up clinical evaluation or risk management
## 🚀 Expected Outcomes
- ✅ Fine-tuned ML models for SHD prediction from ECG data
- ✅ Identification of key ECG markers associated with SHD
- ✅ An explainable AI layer that highlights feature contributions
- ✅ LLM-based recommendation system for clinicians
## 🌟 Novelty & Contributions
- **Scientific:** Demonstrates predictive power of ECG for SHD using fine-tuned ML models
- **Clinical:** Provides interpretable recommendations beyond black-box predictions
- **Technological:** Combines ML with LLMs for explainable decision support
- **Societal:** Enables **low-cost, scalable SHD screening** in resource-limited settings
## 🛠️ Tech Stack
- **Languages:** Python
- **Libraries/Frameworks:** scikit-learn, XGBoost, PyTorch/TensorFlow, SHAP, LIME
- **LLM Integration:** OpenAI / Hugging Face Transformers
- **Visualization:** Matplotlib, Plotly
## 🤝 Contribution
Contributions, issues, and feature requests are welcome!
Feel free to fork this repo and submit a PR.
## 📜 License
This project is licensed under the **MIT License**.
---
🔬 *This project bridges the gap between affordable ECG screening and costly echocardiographic diagnosis, improving early detection and patient care worldwide.*