# Cardiac Arrhythmia Classification Based on One-Dimensional Morphological Features
###### Abstract  
The electrocardiogram (ECG) is the most commonly used tool for diagnosing cardiovascular diseases. Recently, there have been a number of attempts to classify cardiac arrhythmias using machine learning and deep learning techniques. In this study, we propose a novel method to generate the gray-level co-occurrence matrix (GLCM) and gray-level run-length matrix (GLRLM) from one-dimensional signals. From the GLCM and GLRLM, we extracted morphological features for automatic ECG signal classification. The extracted features were combined with six machine learning algorithms (decision tree, k-nearest neighbor, naive Bayes, logistic regression, random forest, and XGBoost) to classify cardiac arrhythmias. Experiments were conducted on a 12-lead ECG database collected from Chapman University and Shaoxing People's Hospital. Of the six machine learning algorithms, combining XGBoost with the proposed features yielded an accuracy of 90.46%, an AUC of 0.982, a sensitivity of 0.892, a precision of 0.900, and an F1 score of 0.895 and presented better results than wavelet features with XGBoost. The experimental results show the effectiveness of the proposed feature extraction algorithm.  
e 20  
used in combination with conventional machine learning algorithms, and it is possible to interpret the extracted features. In contrast, the latter learn in an end-to-end manner and it is difficult to interpret features. However, they demonstrate better performance than conventional machine learning methods in classifying ECG signals when trained with a sufficient amount of data [4].  
For feature-based methods, various types of morphological or statistical features manually extracted from ECG signals in the time domain, the frequency domain, or the nonlinear domain have commonly been used [5; 6]. [PERSON] [7] extracted ECG morphologies, heartbeat intervals, and RR intervals for automated heartbeat classification systems. [PERSON] [8] decomposed multi-lead ECGs into different sub-bands utilizing a stationary wavelet transform and obtained features. These features were used for the detection of inferior myocardial infarction.  
Deep-learning-based methods, such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and long-short term memory (LSTM), are widely applied to interpret ECG signals automatically [4; 9; 10] since these methods can learn inherent well-distinguishable features from raw ECG signals without relying on a cardiologist's intervention. CNNs can effectively learn morphological features of ECG signals [11] and RNNs and LSTM can extract global time-dependent features related to time-varying dynamics through recurrent connections [12; 13].  
Recently, a hybrid approach using a combination of a feature-based method and a deep learning method has also been widely used. [PERSON] [14] fed a modified ECG formed by summing the first three intrinsic mode functions with the use of empirical mode decomposition into a one-dimensional CNN to recognize ECG signals. An approach based on a 1D canonical correlation analysis network with handcrafted features was also presented for ECG classification [15].  
In this study, we propose a novel feature extraction method that focuses on morphological features of one-dimensional ECG signals. In order to extract morphological features, we adopt the gray-level co-occurrence matrix (GLCM) and the gray-level run-length matrix (GLRLM), which are widely used statistical tools for extracting texture information from images. To the best of our knowledge, there are no studies that have applied the GLCM or the GLRLM to one-dimensional signals. A large public dataset of 12-lead ECG arrhythmia signals [16] was used to verify the proposed method.