# Comparison of ANN and ANFIS Models for AF Diagnosis Using RR Irregularities
## 4 Conclusions  
Diagnosis models for NSR, PAF, and AF classification using ANN and ANFIS classifiers were presented in this research. AF symptoms were determined from ECG data after collecting ECG recordings from patients in the hospital. Each segment of a signal was adjusted for baseline wander and noise was removed by a bandpass filter. The four features extracted were _CV_, _MAD_, _RMSSD_, and _SAV_. _CV_, _MAD_, and _RMSSD_ are regular features used in existing classification models. However, the SAV is a new proposed variable for classification. ANOVA testing and [PERSON]'s method were performed to screen for significant variables that would be used for the discrimination of patients. The results showed that all variables are statistically significant for AF patient discrimination. So, these features were utilized to compare the classification models of ANN and ANFIS. ACC, SE, SP, and PPR were the performance measures. ANN with 10, 15, 25, 50, and 100 hidden layers was tested, and it was found that a high number of hidden layers performed better than a low number of hidden layers. For ANFIS models, triangular, trapezoidal, generalized bell-shaped, gaussian and gaussian combinations were investigated. Trapezoidal membership performed the best for almost all types of variables. The ANFIS_trampf performed better than the ANN. The fuzzy logic algorithm in the ANFIS could enhance the performance of AF classification. Among all variables, the SAV showed the highest performance for all methods with different parameters. The highest performance model was the ANFIS with a trapezoidal membership function at ACC 89.33%. SE:SP:PPR in NSR, PAF, and AF were 100.00%:94.00%:89.29%, 88.00%:90.57%:81.48%, and 80.00%:96.00%:90.91%, respectively. The _SAV_ is the most suitable feature for NSR, PAF, and AF classification by RR irregularity features.  
In future research, the best diagnosis model can be developed to diagnose AF patients. Moreover, other cardiac arrhythmias may be studied and classified using these variables. In addition, daily activity is an exciting variable that can be considered in conjunction with cardiac signals or ECG recording for investigation. The sample size in this study was relatively small, and larger sample sizes and other arrhythmias are essential to confirm this study's value. Deep learning can be applied to large datasets to compare performance.  
Conceptualization, S.D., B.P. and S.M.; methodology, S.D. and B.P.; validation, S.D. and B.P.; formal analysis, S.D. and B.P.; investigation, S.D. and B.P.; resources, B.P. and S.M.; data curation, S.D. and S.M.; writing--original draft preparation, S.D. and B.P.; writing--review and editing, S.D. and B.P.; visualization, S.D. and B.P.; supervision, B.P. and S.M.; project administration, S.D. and B.P.; funding acquisition, S.D., B.P. and S.M. All authors have read and agreed to the published version of the manuscript.  
This research was supported financially by research funding from the Faculty of Engineering, Thammasat School of Engineering, Thammasat University Research Unit in Industrial Statistics and Operational Research, Ph.D. Scholarship from Thammasat University, and Center of Excellence in Stroke from Thammasat University, Thailand.  
All subjects gave their informed consent for inclusion before they participated in the study. This study was approved by the Ethical Committee for Human Research, Faculty of Medicine, Thammasat University (EC no. MTU-EC-IM-2-230/63) on 27 October 2020.  
Not applicable.  
Data Availability Statement: The data presented in this study are available at doi: 10.13140/RG.2.2.25106.73921.