# Comparison of ANN and ANFIS Models for AF Diagnosis Using RR Irregularities
## 1 Introduction  
The most common cardiac arrhythmia is atrial fibrillation (AF), and diagnosing and classifying its symptoms with a non-invasive procedure is challenging. AF patients have a high risk of heart disease and stroke. Compared to the overall population, Thai AF patients have a prevalence rate of 5 in 100,000. Ischemic stroke patients have a 1.5-1.9 higher chance of having AF compared to a healthy person in the same age group. About 5-21% of acute ischemic stroke patients have AF, but generally do not realize it, which is very serious [1]. If there were a medical tool or a calculation method to help doctors diagnose AF symptoms or risks from the beginning with acceptable time intervals, then the rate of death could be reduced. Pulse palpation, photoplethysmography, oscillometric blood pressure, and electrocardiogram (ECG) are typical methods of AF investigation, while ECG is the essential physiology equipment used to show bio-signals influenced by an alteration in cardiac autonomic tone. In a general examination, only one page of multichannel ECG signals with approximated 10-s recordings is shown, and abnormal symptoms usually do not appear. Abnormal heartbeat patterns in AF patients cause abnormal electrical signals in the atrial chamber of the circulatory system [2]. A total of 24 h of ECG and heart rate indicators are recommended in the guidelines for AF diagnosis [3]. Figure 1 shows examples of NSR, PAF, and AF signals. Most conventional ECG devices in hospitals that detect AF symptoms using RR interval signals have limitations in accuracy. The typical waveform comprises the P wave,QRS complex, and T wave. However, when irregular RR intervals occur, the absence of distinct repeating P waves, fluctuating P waves (f-waves), irregular heart rate, and inconsistent heart rate variability (HRV) are the signs of AF [4; 5]. ECG signals of AF patients are not consistent and are nonlinear, so they create difficulty in the judgment of AF patients. Investigations of the relationship between the number of reentrant waves in the atrial chambers and abnormal AF signals from ECG signal patterns using signal processing techniques in ECG analysis detected the absence of P waves or RR interval irregularities [6], thus confirming AF patients through long-time ECG recordings. However, P wave and RR intervals are always contaminated with noise artifacts, making it hard to accurately detect AF signals based on these morphological characteristics [7]. Figure 1: Examples of ECG segments for three types of signals. ECG decomposition is P-QRS-T pattern detection, which requires noise reduction and base wander removal. The characteristics and location of the wave were compared with the standard morphological values of the ECG signals. Time-domain and frequency-domain analysis, commonly used in ECG decomposition in most existing research work for abnormality classification, were both used to extract different kinds of information, and their combination gained more knowledge from the signals. ECG classification methods of AF detection also use feature extractions. The main features from the independent component analysis have been used in many pieces of research to classify the abnormality of patients. Previous research shows that RR interval irregularity can help AF diagnosis using the coefficient of variance (CV) [8], the root mean square of the successive differences (RMSSD) [9], and the median absolute deviation (MAD) [10]. Computer-aided medical diagnosis (CAMD) is a medical procedure to help diagnose quickly and increase the efficiency of services [11]. Mathematical models developed by learning and gaining intelligence with experience were used to construct CAMD in many applications [12]. The artificial intelligence (AI) methods closely relate to the statistics of ECG. The ability of CAMD to diagnose in the medical field requires significant variables in learning and many computational techniques [13].