Challenge

Project 1

Summary of the Heart Disease Prediction Project

In this project, we aimed to predict the likelihood of heart disease in patients using various clinical parameters provided by a pharmaceutical company. The dataset included 13 features such as age, sex, chest pain type, resting blood pressure, cholesterol levels, and results from several medical tests, along with a target variable indicating the presence of heart disease (1 for disease, 0 for no disease).

Objective

The main goal was to use machine learning models to accurately predict whether a patient has heart disease based on the clinical data provided. Given the critical nature of healthcare predictions, the accuracy of these models is essential for reliable diagnosis.

Methodology

  1. Data Preparation:

    • The dataset was split into training (80%) and testing (20%) sets.
    • Standardization was applied to the features for models sensitive to feature scaling (e.g., Logistic Regression, K-Nearest Neighbors, and Support Vector Machine).
  2. Machine Learning Models Applied:

    • Logistic Regression: A linear model for binary classification.
    • K-Nearest Neighbors (KNN): A distance-based classifier that predicts the class based on the nearest neighbors.
    • Support Vector Machine (SVM): A model that finds an optimal hyperplane to classify the data.
    • Decision Tree Classifier: A tree-based model that splits data based on feature values to make predictions.
    • Random Forest Classifier: An ensemble method using multiple decision trees to improve prediction accuracy.
  3. Model Evaluation:

    • The models were evaluated based on their accuracy scores on the test data.

Results

The accuracy of the models on the test set was as follows:

  • Logistic Regression: 79.51%
  • K-Nearest Neighbors: 83.41%
  • Support Vector Machine: 88.78%
  • Decision Tree Classifier: 98.54%
  • Random Forest Classifier: 98.54%

The Decision Tree and Random Forest models demonstrated the highest accuracy (98.54%), suggesting that they were the most effective at predicting heart disease based on the given clinical features.

Conclusion

The project successfully demonstrated the application of various machine learning algorithms for heart disease prediction. The high accuracy of tree-based models like Decision Tree and Random Forest indicates their suitability for this type of medical classification task. These models can potentially assist healthcare professionals in early diagnosis and decision-making, leading to better patient outcomes.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.