# Lightweight Ensemble Network for Detecting Heart Disease Using ECG Signals
## 1 Introduction  
Biosignals are indicators of physical health that allow the management of various diseases, such as muscle pain, insomnia, and heart disease [1; 2; 3]. The electrocardiogram (ECG) is the most important signal for confirming the state of the heart [4; 5].  
In an ECG, the heartbeat is represented by electrical signals. The heart rate of a healthy person is usually between 60 and 100 beats per minute [6]. When a person is exercising, tense, or excited, the heart beats faster. There are typically no problems in such cases; however, when the heart beats irregularly for no reason, this symptom is called arrhythmia. According to NHANES 2015-2018 data, the prevalence of cardiovascular disease (comprising coronary heart disease, heart failure, stroke, and hypertension) in adults \(\geq\)20 years of age is 49.2% overall (126.9 million in 2018) and increases with age for both males and females. The prevalence of cardiovascular disease excluding hypertension is 9.3% overall (26.1 million in 2018) [7]. The rapid increase in the number of heart-disease patients due to changes in eating habits and reduced exercise has contributed to the most serious death rate of modern people. The most representative type of heart disease is arrhythmia. Early detection of arrhythmia is crucial, because arrhythmia causes symptoms such as dizziness, fainting, chest pain, and difficulty breathing, and can lead to heart attacks [8].  
Methods of diagnosing arrhythmia include periodically visiting a hospital or using a Holter monitor. However, both of these are inconvenient for patients and can be expensive. In addition, ECG signals measured by widely used smart watches are acquired over a short period of <1 min; therefore, it is impossible to identify cardiovascular diseases, including arrhythmia, using such devices.  
Methods for detecting arrhythmia include detection of early contraction of the ventricles using the RR interval [9], analysis using the discrete Fourier transform [10; 11], and analysis based on the Hilbert transform [12; 13]. These arrhythmia diagnosis methods must be performed by a specialist, and for the early detection of heart disease, a large quantity of ECG data must be checked for irregular events. In addition, there are many factors to be considered for accurate diagnosis, such as the patient's movements and signal interference problems that occur when ECG signals are measured during normal activities [14]. Furthermore, the \"silver generation\" and residents of mountainous areas or islands cannot visit the hospital often, owing to a lack of transportation, physical aging, or disease.  
To overcome these difficulties, we propose an arrhythmia detection algorithm combining MobileNetV2-BiLSTM and a matching pursuit algorithm that can accurately diagnose arrhythmia using ECG data. To increase the accuracy of the algorithm, the ECG signal in the time domain was converted to the frequency domain using a scalogram.  
Because the proposed algorithm augmented ECG data using matching pursuit, it was possible to accurately detect arrhythmia through ECG signals measured within a short timeframe by learning a large quantity of data. The proposed algorithm used the ECG database provided by MIT-BIH [15; 16]. An experiment was conducted for increasing the classification accuracy using a small quantity of data. The number of data used in the algorithm is 654, with approximately 164 data per class. For training algorithms, this scale of data is insufficient. To solve this problem, the matching pursuit algorithm is used, which can decompose data or duplicate data. The matching pursuit algorithm can eliminate noise because it can approximate the signal. By combining MobileNetV2-BiLSTM and matching pursuit and applying the proposed algorithm to ECG signals, we confirmed the possibility of developing an efficient health-management algorithm applicable to mobile devices.