# Comparison of ANN and ANFIS Models for AF Diagnosis Using RR Irregularities
## 1 Introduction
Machine learning has become widely used in clinical practices, especially with ECG data, such as in support vector machine (SVM), K-nearest neighbor (KNN), and decision tree (DT) analyses [14]. Heart abnormality classification was the most common application of ECG data [15]. Artificial neural networks (ANN) and adaptive neuro-fuzzy inference systems (ANFIS) are currently used to construct models for many applications, such as cancer diagnosis, cardiovascular disease classification, risk assessment for hypertension, atherosclerosis level classification, and predicting symptoms of AF patients [16]. ANN and ANFIS are also powerful classification methods in many applications [17]. Deep learning has become a widespread technique and is most commonly used in supervised machine learning problems. It did not require the detection of P and R peaks or feature designs for classification [18]. However, it can perform well for big datasets [15]. [PERSON] et al. (2020) showed the list of deep learning techniques for ECG arrhythmia classification from 75 studies and found that the convolutional neural network (CNN) was the dominant technique [19]. They also found that deep learning sped up the process, but the results were not exceptional for finding an abnormal heartbeat. Moreover, deep learning requires an extensively large number of datasets. Feature designs for classification should be used if the number of datasets is not broadly large. Efficient variables should be investigated. As a result, doctors can obtain more information to help with making the right decision for treatment, which can increase the chance of patients returning to their normal physical condition as soon as possible. Most AF classification models were developed from the MIT-BIH Atrial Fibrillation database [20; 21; 22] to compare the performance of computational methods suitable for medical applications. The diagnosis of AF uses feature extraction to find significant variables, including the function algorithm, the time-varying coherence function, conditional entropy, frequency domain tracking, and deep learning [23]. These feature extraction characterizations are used and provide different performance values depending on the suitability of the measuring device and its practical application. Datasets of databases have been used as inputs for the classification models that can obtain high accuracy. However, it may not be suitable for the current population of local patients because the database has been developing for a long time. Therefore, a classification model for local patients is necessary for physicians to analyze AF patients more accurately. The novelty presented in this research is the newly proposed feature, the square of average variation (SAV), for the classification of NSR, PAF, and persistent AF using patients' data that outperforms the others. The classification of these three types of AF categories has not been investigated. ANN and ANFIS methods were employed with different parameters to find the best classification model. To the best of our knowledge, ANN and ANFIS have not been applied to classify NSR, PAF, and persistent AF with local patient datasets. The proposed classification model and the newly proposed feature (SAV) show outstanding high performance in accuracy, sensitivity, specificity, and positive predictivity in this research. This research aims to propose a classification model that is practical for local patients and efficient RR irregularity variables. The current RR irregularity variables and a newly proposed feature SAV for the classification of NSR, PAF, and persistent AF were examined. Data from local patients were utilized instead of using datasets from databases, as other papers do, which is more practical. Comparing methods with different datasets cannot guarantee the efficiency of the methods. So, this research compared ANN and ANFIS using the same datasets from Thai patients. This paper addresses the following research questions:  
1. What is the best RR irregularities feature for AF classification? 2.