Abstract:
Heart disease is one of the main causes of death all over the world. Accurate diagnosis is essential for efficient treatment and the prevention of heart-related issues. Electrocardiography (ECG) is the most common diagnostic tool for identifying cardiac abnormalities. With recent advancements in machine learning, there has been growing interest in using ECG signals to develop accurate and automated methods for detecting heart disease.
The present study aims to analyze ECG signals and employ machine learning algorithms to predict the presence of cardiac disease. Specifically, we use the PTB diagnostic ECG database from Physionet and focus on single I lead ECG signal. We developed our own method to derive PQRST peak values and extracted 23 features from the raw ECG data. To address the issue of imbalanced datasets, we used ADASYN, an oversampling technique, which proved to be more effective than other data balancing methods. We evaluated the performance of four commonly used algorithms of machine learning, including logistic regression, decision tree, random forest, and gaussian naive ayes, using repeated stratified 10-fold cross-validation.
Our results show that the random forest algorithm achieved the highest classification accuracy of 99.8%, followed by decision tree with 92%, logistic regression with 85%, and Naive Bayes with 82%. The high accuracy achieved by the random forest algorithm is significant and unique compared to existing literature. Our study’s approach of using four commonly used algorithms and oversampling techniques provides valuable insight into the effectiveness of these algorithms in detecting cardiac diseases. We also conducted a detailed age-wise analysis where we divided our dataset into different age groups and used our generic model for classification. We observed that random forest outperforms all others by various performance metrics. Our study can serve as a benchmark for future research on ECG signal analysis using machine learning techniques. The application of these algorithms can facilitate the early detection of heart disease, leading to better patient outcomes and improved healthcare services. Future work includes expanding our study to a larger dataset and exploring the potential of our method for detection of heart disease in at-risk populations.