Electrocardiogram Signal Classification Using Manual/Automated Features and Machine Learning Algorithms: A Large Cohort Study on Students Aging from 6 to 18 Years Old
Authors: Hajianfar Ghasem , Khorgami Mohammadrafie , Rezaei Yosef , Amini Mehdi , Samiei Nilofar , Tabib Avisa , Borji Bahareh Kazem , Kalayinia Samira , Shiri Isaac , Hosseini Saeid , Oveisi Mehrdad 
Published: April 2022

Cardiac rhythm abnormalities are one of the main cardiovascular diseases leading to morbidity and mortalities. Electrocardiogram (ECG), since its introduction, has been extensively used for the detection of rhythm disturbances The differentiation of abnormal ECG from normal one is the cornerstone of public health programs. The interpretation of ECGs by physicians is a time-consuming process that is not free of faults. In this study we sought to determine the accuracy of different machine learning models in distinguishing abnormal ECGs from normal ones in a large sample of in-house data sets of children’s who were examined using resting ECG machine during a community-based study. Altogether, 10745 ECGs were recorded for student aging from 6 to 18 years old. Manual and automatic ECG features were extracted for each participant. Features were normalized using Z-score normalization and went through the student’s t-test and chi-squared test to measure their relevance. All p-values were corrected with Benjamini-Hochberg (BH) method and were reported as q-value. We applied Boruta algorithm for feature selection and then implemented 8 different classifiers, including eXtreme Gradient Boosting (XGB), Support Vector Machine (SVM), Quadratic Discriminant Analysis (QDA); Random Forest (RF), Decision Tree (DT), K-nearest neighbors (KNN), Logistic Regression (LR), and Stack Learning (SL) for classification purpose. The dataset was split into training (80%) and test (20%) partitions. Hyper-parameter optimization of classifiers was performed on selected features by 10-fold cross validation and random search. Optimal models were made on training dataset and performance of the models was evaluated on the test data (unseen data) by 1000 bootstrap. We also reported mean ± SD and 95% confidence interval (CI) for each model. The performance of models was evaluated by sensitivity (SEN), specificity (SPE), AUC, and accuracy (ACC). In univariate analysis, the highest performance feature was heart rate and RR interval in the manual dataset with an AUC of 0.72, followed by heart rate in automated dataset with an AUC of 0.71. We also found QT in both of datasets had an AUC of 0.68. The Boruta method selected 15 and 16 features in the manual and the automated datasets, respectively. The best models in the manual dataset were RF and QDA model with AUC, ACC, SEN, SPE equal to 0.93,0.98, 0.69, 0.99 and 0.90, 0.95, 0.75, 0.96, respectively. In the automated dataset, QDA (AUC: 0.89, ACC: 0.92, SEN: 0.71, SPE: 0.93), and SL (AUC: 0.89, ACC: 0.96, SEN: 0.61, SPE: 0.99) reached best performances. This study demonstrated that the manual measurement of ECG features had better performance than the automated measurement but automated measurement in some model had promising result in discriminating normal and abnormal cases.