Heart Disease Prediction Model 🫀🚀
This repository contains a comprehensive Machine Learning project designed to predict the likelihood of heart disease in patients based on clinical features and medical datasets.
📝 Project Overview
Cardiovascular diseases are a leading cause of mortality globally. Early detection can save lives. This project implements an automated machine learning pipeline to analyze patient metrics (such as age, sex, chest pain type, cholesterol levels, and max heart rate) to accurately classify heart disease risks.
🖥️ User Interfaces
The project is equipped with dual user interfaces to showcase both rapid prototyping and robust full-stack production layouts:
1. Streamlit Web App (Python-Based)
An interactive, clean, and highly efficient analytical dashboard built completely in Python using Streamlit. Ideal for instant predictions and data explorations.
2. Full-Stack Web UI (HTML, CSS & JavaScript)
A custom-designed, fully responsive, and highly polished front-end web portal created with semantic HTML5, modern CSS styling, and interactive JavaScript, connecting to the ML backend API.
📊 Dataset Features
The dataset (heart.csv) consists of several clinical indicators:
- Numerical Features:
Age, RestingBP, Cholesterol, FastingBS, MaxHR, Oldpeak
- Categorical Features:
Sex (M/F), ChestPainType (TA, ATA, NAP, ASY), RestingECG, ExerciseAngina, ST_Slope
- Target Variable:
HeartDisease (1 = Presence, 0 = Absence)
📊 Model Evaluation & Results
The automated training sequence evaluated multiple supervised classification algorithms. Below are the performance metrics recorded during validation:
| Model | Accuracy | F1-Score |
|---|
| Logistic Regression 🏆 | 0.87 | 0.89 |
| KNN | 0.86 | 0.88 |
| Naive Bayes | 0.85 | 0.87 |
| SVC (Support Vector Classifier) | 0.85 | 0.87 |
| Decision Tree | 0.78 | 0.81 |
Note: Logistic Regression yielded the highest overall performance for this specific medical dataset layout.
- Clone the repository:
git clone [https://github.com/yourusername/heart-disease-prediction.git](https://github.com/yourusername/heart-disease-prediction.git)
Developed a Machine Learning project to predict Hard Disk performance & transfer speeds. Built an automated pipeline evaluating multiple supervised models. Features dual UIs: an interactive Python-based Streamlit dashboard and a responsive full-stack HTML/CSS/JS frontend connected to an ML backend. Great for hardware optimization!