Heart Disease Detection using Machine Learning

Qalandar

Qalandar Bux

๐Ÿซ€ Heart Disease Detection using Machine Learning

This project aims to predict the presence of heart disease using machine learning algorithms. It leverages a dataset of patient attributes and applies Decision Tree and K-Nearest Neighbors (KNN) classifiers to make predictions.

๐Ÿš€ Project Overview

Heart disease is a leading cause of death worldwide. Early detection can help in timely treatment and potentially save lives. This project uses two supervised learning models to classify whether a person is likely to have heart disease based on medical features.

๐Ÿ› ๏ธ Tools & Technologies

Python 3
scikit-learn
pandas
matplotlib (optional, for visualization)
Jupyter Notebook / VS Code

๐Ÿ“‚ Dataset

File: heart.csv
Contains patient health records with features such as:
Age
Sex
Chest pain type
Resting blood pressure
Cholesterol level
Fasting blood sugar
Rest ECG
Maximum heart rate
Exercise-induced angina
ST depression
Number of major vessels
Thalassemia
Target (1: Disease, 0: No disease)

๐Ÿ“Š Algorithms Used

โœ… 1. Decision Tree Classifier

Simple and interpretable tree-based algorithm.
Suitable for datasets with both categorical and numerical features.

โœ… 2. K-Nearest Neighbors (KNN)

Instance-based learning algorithm.
Classifies based on the majority vote from k nearest samples.

๐Ÿงช How to Run

Clone the Repository
git clone https://github.com/Qalandar-Bux1/Heart-Disease-Detection.git
cd Heart-Disease-Detection
Like this project

Posted Aug 30, 2025

Developed a heart disease prediction model using Decision Tree and KNN.