Comparison Of Various Machine Learning Models With A Hybrid Model (Cnn–Lstm) Using An Electrocardiographic Image Dataset For Early Prediction Of Cardiovascular Disease
DOI:
https://doi.org/10.64252/45jtma80Keywords:
Heart Disease Prediction, ECG Image, CNN–LSTM Hybrid, Deep Learning, Feature Selection, Ant Lion Optimization, Bat-Inspired Algorithm, Medical AI, Cardiovascular Diagnosis, Non-Invasive Detection.Abstract
Heart disease continues to be a leading cause of mortality across the globe, highlighting the urgent need for accurate, efficient, and non-invasive diagnostic tools. This thesis offers the expansion of a novel machine learning-based framework designed to predict heart disease from “Electrocardiogram (ECG)” image data. The proposed methodology leverages the strengths of deep learning by integrating “Convolutional Neural Networks (CNN)” for spatial feature extraction and “Long Short-Term Memory (LSTM)” networks for capturing temporal dependencies in ECG signals. The hybrid CNN–LSTM architecture is complemented with robust preprocessing techniques and intelligent feature selection mechanisms to enhance predictive accuracy and generalization capabilities.
The study begins with the acquisition of a publicly available ECG image dataset from Kaggle, containing multiple classes of heart conditions, including normal rhythms, myocardial infarction, and other abnormalities. To improve model robustness and mitigate overfitting, various “image augmentation techniques such as rotation, flipping, scaling, brightness modification, and Gaussian noise” were applied. These operations ensured diversity in the training data while preserving the diagnostic integrity of the ECG waveforms. Preprocessing steps like normalization and noise reduction were used to standardize input quality and align it with the requirements of the deep learning model.
A significant innovation in this framework is the use of metaheuristic algorithms-specifically, the “Ant Lion Optimization (ALO)” and “Bat-Inspired Algorithm (BIA)”-for effective feature selection. These optimization methods reduce computational complexity by identifying the most relevant features, thereby enhancing the model’s performance without compromising on accuracy. The selected features are passed through the CNN–LSTM model, where CNN layers detect spatial patterns within the ECG images, and LSTM layers process the sequential nature of heartbeats to capture temporal irregularities often associated with cardiac conditions.
The dataset is divided into 70% training and 30% testing groups using stratified sampling to guarantee fairness and effective learning. Although solo CNN models fail miserably when presented with sequential data, the findings show that, achieving only 49% accuracy, and LSTM models achieve 94% accuracy, the hybrid CNN–LSTM architecture offers a more balanced and powerful solution. It achieves 94% accuracy, 95% precision, 94% recall, and an F1-score of 94%, confirming its superior diagnostic capability.
This study not only demonstrates the viability of using deep learning for heart disease detection but also offers a scalable and portable framework suitable for remote and resource-limited healthcare settings. The combination of non-invasive input (ECG images), intelligent optimization, and deep learning makes it a promising tool for real-time applications, wearable technology, and telemedicine platforms. Ultimately, this work contributes meaningfully to the intersection of healthcare and artificial intelligence, paving the way for more advanced, accessible, and automated diagnostic systems in cardiology.