A proposed approach for diabetes diagnosis using neuro-fuzzy technique

Diabetes is a chronic disease characterized by a decrease in pancreatic insulin production. The immune system will be harmed due to this condition, which will raise blood sugar levels. However, early detection of diabetes enables patients to begin treatment on time, therefore reducing or eliminating the risk of severe consequences. One of the most significant challenges in the healthcare unit is disease diagnosis. Traditional techniques of disease diagnosis are manual and prone to inaccuracy. This paper proposed an approach for diagnosing diabetes using the adaptive neuro-fuzzy inference system (ANFIS) based on Pima Indians diabetes dataset (PIDD). The three stages of the proposed approach are pre-processing classification and evaluation. Normalization, imputation, and anomaly detection are part of the pre-processing stage. The pre-processing was done by normalizing the data, replacing the missing values, and using the local outlier factor (LOF) technique. In the classification stage, ANFIS classifiers were trained using the hybrid learning algorithm of the neural network. Finally, the evaluation procedures use the last stage’s sensitivity, specificity, and accuracy metrics. The obtained classification accuracy was 92.77%, and it seemed rather promising compared to the other classification applications for this topic found in the literature.


INTRODUCTION
Diabetes mellitus (DM) is a chronic disease defined by an insufficient amount of insulin produced by the pancreas.Insulin is a hormone that maintains a healthy blood sugar balance.If insulin does not function properly, it will cause a rise in the blood glucose level [1].Diabetes has several consequences, including an increased risk of blindness, high blood pressure, renal damage, and heart disease [2].The World Health Organization (WHO) studied that over 37 crore people worldwide presently suffer from this chronic condition, which is anticipated to double by 2030 [3].Recent advancements in the healthcare industry have improved diabetes early detection; however, over half of diabetic individuals are ignorant of their condition.It might take ten years or more to diagnose them.As a result, an expert system capable of processing imprecise and unclear data, as is the situation in the medical area, is required for early diabetes diagnosis.
One of the most significant challenges in the healthcare unit is disease diagnosis.Traditional disease diagnosis techniques are manual and prone to inaccuracy [4].Compared to human competence alone, prediction approaches based on artificial intelligence (AI) allow auto-diagnosis and decrease the detection of Bulletin of Electr Eng & Inf ISSN: 2302-9285  mistakes [5].Diabetes prediction algorithms often encounter noisy, missing, irrelevant, and inconsistent data [6], [7].The model's effectiveness is determined by the accuracy of the diabetic data provided; as a result, the researcher must submit credible data to the classifier for the disease to be predicted accurately [8].In the medical area, fuzzy logic (FL) algorithms are well-suited to handle ambiguity and uncertainty in large datasets that are ideal for decision-making in diabetes diagnosis [9].FL's adjustment constraint during the learning process was solved by introducing adaptive neuro-fuzzy inference system (ANFIS), which combines the benefits of fuzzy control interpolation with adaptability through neural network backpropagation [10].
Numerous studies have predicted diabetes using a variety of diabetic datasets utilizing machine learning (ML), FL, and hybrid techniques.We included only studies based on the PIDD.One of the works in which researchers used fuzzy logic for diabetes diagnosis is Aamir et al. [11].They used FL to create a model with two fuzzy classifiers: fuzzy logic and the cosine amplitude approach.Manikandan [12] suggested a model using the FL and grey wolf optimization (GWO) method.Thungrut and Wattanapongsakorn [13] describe two fuzzy and genetic algorithms were used to increase classification accuracy.
Regarding the works in which researchers used ANFIS technology, an ANFIS classification was used by Priyadarshini et al. [14].They used 240 rules generated in MATLAB.Alby et al. [15] developed a method using ANFIS with GA.Kalaiselvi et al. [16] proposed ANFIS-based k-nearest neighborhood (KNN).
Regarding how researchers used ML techniques in diagnosing diabetes, Khanam and Foo [5] examined multiple ML approaches, such as support vector machines (SVM), random forest (RF), KNN, and artificial neural network (ANN).Pradhan et al. [17] proposed an ANN algorithm to identify diabetes.Table 1 illustrates the comparison of related work with the accuracy that achieved.
This study aims to detect type 2 diabetes in its earliest stages to ensure that patients get quick treatment and avoid serious consequences.Additionally, it is aimed to achieve a high degree of classification accuracy.The study proposes a neuro-fuzzy approach to predict diabetes with well-known PIDD data.The rest of this paper is as follows: section 2 outlines the research method.Section 3 highlights the findings acquired using our proposed approach.Finally, section 4 concludes this work.

METHOD
The approach consisted of three stages: Pre-processing, classification, and evaluation.First, normalization, imputation, and anomaly detection are steps of pre-processing.Next, the ANFIS was used with backpropagation (BP) and least square estimation (LSE) estimation in the classification stage to get the best fuzzy rules possible.Finally, the evaluation stage uses accuracy, sensitivity, and specificity criteria.The proposed approach architecture and operations carried out by each architecture component during diagnosis are shown in Figure 1.The following subsections outline the suggested strategy in further depth.The dataset most commonly used to compare diabetes diagnosis algorithms was obtained from [21].The data set included a total of 768 instances.The dataset is divided into two groups, denoted by the codes 1 and 0 for diabetes and healthy.There are 268 instances in class 1 (34.9%) and 500 occurrences in class 0 (65.1%).There are eight continuous features: (1) Number of pregnancies.(2) Plasma glucose concentration measured over two hours during an oral glucose tolerance test.(3) Blood pressure in the diastole (mm Hg). ( 4) Thickness of the triceps skinfold (mm).( 5) 2-hour serum insulin concentration (mu U/ml).( 6) Body mass index (BMI).( 7) Diabetes pedigree function ( 8) Age (years).

Pre-processing stage
Data pre-processing enables the generation of a robust classification model with high accuracy [22].At this stage, some initial operations are performed on the PIDD to improve classification precision.

Normalization
Normalization is a widely used data preparation method that enables the values of numeric columns in a dataset to be converted to a standard scale [23].Because the range of different attributes in PIDD varies, one of the pre-processing steps is to normalize attributes such that their normalized values lie within the range of (0,1).This processing allows for more accurate comparisons.We employed min-max scalar (MMS) [24] as the normalization model in our proposed approach.The MMS is shown in (1):

Imputation
Imputation of missing data is a process that substitutes probable values for the missing value [25].The different imputation approaches are designed to generate reliable estimates of population parameters [26].The quantity of missing data determines the optimum approach for missing data [27].Although there is no rule for what percentage of data is unacceptable, comparing findings before and after imputation is usually preferable when more than 25% of data is missing [28].Mean imputation is the most often used technique for replacing missing data.

Anomaly detection
Anomalies are patterns within a dataset that deviate from well-defined and expected behavior [29].Anomaly detection is the process of identifying these patterns [30].These anomalies often have a negative impact on classification accuracy [31].The local outlier factor (LOF) is a practical unsupervised machine learning approach that finds outliers in local regions rather than the overall data distribution [32].After calculating outlier ratings for each data point, the data points may be sorted to identify outliers in the dataset.In (2) expresses the relative density of a data point X with k neighbors: X density is proportional to the average distance between the k-nearest data points [33].

Classification stage
Due to the fuzziness of the dataset's properties and the benefits of the ANFIS approach, ANFIS was employed for classification allowing for further modification or optimization.ANFIS was proposed by Jung [34].It combines ANN and fuzzy inference system (FIS), where ANN algorithms determine the fuzzy system's parameters and expressively model uncertainty.The FL algorithm maps each parameter in the dataset to linguistic labels using a membership function (MF).This operation is utilized to trace incoming data to output data during computational analyzes of the ANN component [35], [36].ANFIS determines parameters using a hybrid learning strategy that merges BP and LSE [37].The ANFIS architecture could be described as a five-layer neural network.The input layer for our proposed approach comprises eight attributes, each with three MFs, and the fuzzy set was (low, medium, and high), resulting in layer one having 24 nodes.ANFIS structure is shown in Figure 2 [34], whereas Figure 3 1, =   −2 ( 2 ),   = 3,4 X1, X2 are the input nodes i, and A, B are the linguistic labels for this node, and the MFs are µ( 1 ) and µ( 2 ).b.The second layer (Rules) In this layer, the output of nodes displays the firing strength of the rule and is symbolized by (π).The result is indicated in (5): 2, =   =    ( 1 ).   ( 2 ).   ( 3 ).   ( 4 ).   ( 5 ).   ( 6 ).   ( 7 ).   ( 8 ) (5) c.The third layer (Norm) The nodes of the third layer are also fixed and symbolized by (N), and the nodes represent the normalized firing strength of each rule as ( 6): d.The fourth layer (Then part) Nodes in this layer are adaptive, and a node function displays the contribution of the rules toward the total output.The nodes multiply the normalized weight of each fuzzy rule by the latter part of that rule.
pi, qi, and ri are specified parameters known as consequent parameters.
e.The fifth layer (Output) This layer consists of a single circular (fixed) node, symbolized by (∑).This node handles all output values from the fourth layer nodes and delivers them into the network as (8): (8)

Evaluation stage
The proposed approach results were evaluated using sensitivity, specificity, and accuracy.These statistical measurements reveal a test's essential reliability in the medical diagnostic test [38].Sensitivity shows the ability to separate positive patients from all patients in a test.Specificity is an ability of the separates to be real sturdy from within the all sturdy.Accuracy identified the diagnostic test by excluding a specific condition.To calculate these metrics, we first compute certain concepts such as false negative (FN), true positive (TP), false positive (FP), and true negative (TN) using the definitions in Table 2.

RESULTS AND DISCUSSION
The dataset was first normalized, implying that each value falls between (0 and 1).The MMS technique is used for normalization in equation ( 1).This adjustment helps mitigate the adverse effects of specific attributes prevailing, particularly undesirable ones due to their more extensive value ranges.Next, data imputation is applied, as many features have zero value (For example, the lowest Blood Pressure value is 0 (which is not conceivable)).As a result, erroneous information is provided.We can replace such values with medians since we cannot discard such observations (which results in a 4.6 percent data loss).We have chosen to impute as we have a small dataset (768 observations).We should note that some features must not be imputed (i.e., Pregnant) because the zero value here does not represent a missed value.Finally, anomaly detection is performed using the LOF technique, and (68) outlier values are removed from PIDD after applying this technique.
The ANFIS classifiers were implemented at the classification stage using the MATLAB script.The dataset was randomly divided into two parts: The first is training part contains (470) records which are 67% of the dataset, and the testing part contains (230) records which are 33% of the dataset since the total number of the dataset is (700) after removing the outliers.The training data is used to train the model, while the testing data is used to verify the trained model's accuracy and effectiveness.The parameters of FIS are tuned using a hybrid optimization learning method.This strategy trains the model using LSE and BP techniques.
In order to identify the best number of epochs for training the FIS, we utilized the model complexity graph.The early epochs demonstrate a reduction in training and testing error, implying that training should be continued.When the error in the testing increases or decreases, the training should be interrupted, this is the ideal trade-off between epochs and model complexity.We began with (100) epochs with an error tolerance of (0.01) and gradually decreased to the optimal (70) epochs.Figure 4(a) depict the complexity graph for training, while Figure 4(b) depict the complexity graph for testing.Both training and testing processes were repeated for different epochs, as shown in Table 3.
The evaluation stage determines the classifier's test performance by computing its sensitivity, specificity, and accuracy.The of the statistical of the ANFIS model were sensitivity (97.65%), specificity (84.30%), and accuracy (92.77%).To demonstrate the efficacy of the proposed approach strategy, ISSN: 2302-9285  A proposed approach for diabetes diagnosis using neuro-fuzzy technique … (Maher Talal Alasaady)

3595
we generated classification models on the same dataset using another five popular learning classifiers and compared them with the proposed model; the validation results are illustrated in Table 4 and Figure 5.The proposed approach outperforms all widely used learning classifiers as shown in Table 1 to compare these classifiers with our method.

CONCLUSION
This research proposes a multistage classification approach to acquire accurate results using ANFIS for classifying patients with diabetes based on PIDD.The pre-processing was done by normalizing the data, replacing the missing values, and using the LOF technique to eliminate data anomalies.ANFIS classifiers were implemented in the MATLAB script.Finally, the evaluation stage uses accuracy, sensitivity, and specificity criteria.The results of the statistical of the ANFIS model were sensitivity (97.65%), specificity (84.30%), and accuracy (92.77%).There is still exciting work ahead; this includes: Adding an optimization process, using deep learning algorithms, and using classification for other diseases.

Figure 1 .
Figure 1.The proposed approach architecture

3593 𝑂 1 ,
illustrates its structure for diabetes classification.a.The first layer (IF part) All nodes in this layer are represented by adaptive nodes, representing the function of belonging to the system's entry.Each node has the following activation functions: Bulletin of Electr Eng & Inf ISSN: 2302-9285  A proposed approach for diabetes diagnosis using neuro-fuzzy technique … (Maher Talal Alasaady)  =    ( 1 ),   = 1,2

Figure 4 .
Figure 4. Complexity graph for training and testing data, (a) training graph and (b) testing graph

Figure 5 .
Figure 5. Graphical comparison of accuracies with other common classifiers

Table 3 .
Performance of ANFIS during epochs

Table 4 .
Comparison of accuracies with other standard classifiers