Artificial Intelligence-Driven ECG Signal Classification for Heart Disease Detection Using Decision Tree Algorithm
Thanakrit Janchidfah, Narumol Chumuang, Mahasak Ketcham, Thittaporn Ganokratanaa, Shridhar Allagi
Abstract
This study presents the development and evaluation of an artificial intelligence-based classification model for identifying heart disease from electrocardiogram (ECG) signals. The dataset used comprises 4,998 anonymized records obtained from a publicly available ECG repository on Kaggle. Each record consists of 140 numerical values representing electrical activity of the heart and is labeled as either “Normal” or “Abnormal.” To ensure robust performance assessment, the data were partitioned into a training set (60 %) and a testing set (<tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\text{4 0 \%}$</tex>). A decision tree model based on the <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\text{C 4. 5}$</tex> algorithm was developed, utilizing Gini impurity as the criterion for node splitting. The model was trained to distinguish between normal and abnormal ECG patterns with high interpretability and computational efficiency. The experimental results demonstrated a classification accuracy of 97.65 %, with the model correctly identifying 1,952 out of 1,999 test samples. Additional performance metrics, including a precision of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\text{9 8. 5 0 \%}$</tex> and recall of <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$\text{9 6. 8 4 \%}$</tex>, confirmed the model's reliability and balance between sensitivity and specificity. The findings highlight the potential of decision tree-based classifiers as effective and interpretable tools in automated ECG analysis. Moreover, this study contributes to the integration of AI technologies in clinical decision support systems and lays the groundwork for future development of wearable health-monitoring applications.