Alejandro Olmedo

Machine Learning for Heart Disease Prediction

A comparative machine learning study that evaluates logistic regression, support vector machines, and neural networks for predicting heart disease from clinical patient data.

Machine Learning for Heart Disease Prediction

Project Overview

This project investigates which machine learning technique is most effective for predicting heart disease using a dataset of 918 patient records and 11 clinical features, including age, cholesterol, resting blood pressure, maximum heart rate, chest pain type, and exercise-induced angina. The data was preprocessed using feature standardization and one-hot encoding, then divided into training, validation, and test sets. Logistic regression, support vector machines, and feedforward neural networks were evaluated under multiple feature transformations, model architectures, and regularization settings. The analysis also included K-means clustering, principal component analysis, feature-distribution visualizations, and correlation analysis. Several models achieved a top test accuracy of 89.13%. Logistic regression with second-degree polynomial features and a regularization value of 0.1 produced the strongest overall balance, achieving 90.48% precision, 91.57% recall, and a 91.02% F1 score. The results demonstrate that a carefully configured classical model can perform as well as, or better than, more complex neural networks on structured clinical data.

Technologies Used

Pythonscikit-learnTensorFlowKerasPandasNumPyMatplotlibSeabornJupyter Notebook

Project Details

Completed

2025-05-02

GitHub Repository

View Source Code

Live Demo

Visit Website