This project focuses on predicting the likelihood of heart disease using machine learning techniques. By analyzing clinical healthcare data, the model identifies patterns and risk factors associated with heart disease and helps estimate whether a patient is at risk.
The goal of this project is to demonstrate a complete data science workflow, including data preprocessing, exploratory data analysis (EDA), model training, and evaluation using classification algorithms.
The dataset contains various medical attributes related to heart health, including:
- Age
- Sex
- Chest pain type
- Resting blood pressure
- Cholesterol level
- Fasting blood sugar
- Resting ECG results
- Maximum heart rate achieved
- Exercise induced angina
- ST depression
- Slope of peak exercise ST segment
Target variable:
- 0 → No Heart Disease
- 1 → Heart Disease Present
- Python
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-learn
- Jupyter Notebook
- Importing required libraries
- Loading and exploring the dataset
- Data cleaning and preprocessing
- Exploratory Data Analysis (EDA)
- Feature engineering
- Training multiple machine learning models
- Model evaluation and comparison
- Generating insights from the data
The following classification algorithms were implemented and compared:
- Logistic Regression
- Random Forest
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
Model performance was evaluated using:
- Accuracy
- Confusion Matrix
- Classification Metrics
The machine learning models were trained and evaluated on the dataset to identify the most accurate model for heart disease prediction. The results highlight how machine learning can assist healthcare professionals in early detection and risk assessment.
- Certain clinical factors such as age, cholesterol levels, and chest pain type significantly influence heart disease prediction.
- Machine learning models can effectively classify patients into risk categories based on medical attributes.
- Hyperparameter tuning to improve model performance
- Deployment using web frameworks (Streamlit / Flask)
- Integration with larger healthcare datasets
- Development of a real-time prediction interface
- Clone the repository
git clone https://github.com/maheshsharma01/Heart-Disease-Prediction-using-Machine-Learning.git
- Navigate to the project folder
cd Heart-Disease-Prediction-using-Machine-Learning
- Install required libraries
pip install -r requirements.txt
- Run the notebook
jupyter notebook
Mahesh Sharma
Machine Learning & Data Science Enthusiast
M.Tech in Computer Science and Engineering