ARTIFICIAL NEURAL NETWORK MULTI-LAYER PERCEPTRON FOR DIAGNOSIS OF DIABETES MELLITUS

Diabetes Mellitus is a disease caused by an unhealthy lifestyle, so blood sugar is not controlled, causing complications. This disease is one of the most dangerous diseases in the world. Approximately 422 million people worldwide have diabetes, the majority living in low-and middle-income countries, and 1.5 million deaths are caused by diabetes each year. The number of cases and prevalence of diabetes have continued to increase over the last few decades. Artificial Neural Networks are a part of machine learning that can solve various problems. One of them is in terms of disease diagnosis. MLP has the advantage that learning is done repeatedly to create a durable, consistent system that works well. This research aims to implement the Multi-Layer Perceptron Artificial Neural Network method for diagnosing diabetes mellitus and then evaluating the MLP by analyzing precision, recall, f1 score, and calculating accuracy. Next, it is validated with k-fold cross-validation. In the experiment in this study, several scenarios were used, and the best scenario was obtained when using eight input layers, seven hidden layers, one output layer, and 5000 iterations. The experiment results showed that the multi-layer perceptron successfully classified diabetics and non-diabetics by percentage. Precision 77.24%, Recall 72.58%, F1 Score 76.86%, accuracy 75%, and average accuracy 78.01


INTRODUCTION
Diabetes mellitus is a chronic disease that causes up to 1.5 million deaths a year (WHO, 2023).This disease is synonymous with an unhealthy lifestyle; the amount of sugar and calorie intake that enters the body is not balanced with sufficient body activity, so sugar accumulates in the blood and becomes diabetes or what is more commonly called diabetes mellitus [1].
Various efforts have been made to reduce the rate of diabetes mellitus sufferers.One way is to carry out an initial diagnosis of diabetes mellitus.Of course, skilled health workers are needed for initial diagnosis, but more health workers in various countries are needed.However, the development of artificial intelligence has become a solution for the world of health.Various studies have been conducted to diagnose diabetes mellitus [2]- [5].
[2] Classified diabetes using the K-NN method.The data validation process has yet to be carried out in this research.[3] uses the SVM method for the classification process, which is different from what will be done in this research, namely, using a multilayer perceptron.[4] uses several machine learning methods, but the type of data used is image data.Meanwhile, [5] compares the SVM and K-NN methods.The dataset used is different from the one used in this research, and the method used is also different.
This research will utilize a Neural Network machine learning algorithm.In artificial neural networks, various models can be applied.For this research, a multi-layer perceptron was used to diagnose diabetes mellitus.The use of MLP has been carried out by several other researchers on various types of objects and is considered reliable [6][7][8][9][10].
[6] utilized MLP for the classification of hypertension in adolescents in Malaysia.This system can classify hypertension well.[7] in the case of ceramic insulators.[8] in the case of fertility rates in men.[9] diagnosed Alzheimer's disease, where the system was able to classify with 99.35% accuracy.

Tavares And Abidin, Artificial Neural Network … 20
Then [10] chronic kidney disease was classified with an accuracy rate of 92.5%.So, in this research, a multilayer perceptron will be used to classify diabetes in women.
In the proposed research, the evaluation process uses precision, recall, f1 score, and accuracy calculation analysis.The aim is to determine the reliability of the multi-layer perceptron model in diagnosing diabetes mellitus.Then, validation will be carried out using k-fold cross-validation [11].The validation process is carried out because validating the model's performance can be improved.

RESEARCH METHOD
Multi-layer perceptron is part of an Artificial Neural Network (ANN).It consists of several neurons, and there are connections between these neurons.These neurons will transform the information received through their output connections to other neurons.In a multi-layer perceptron, this relationship is known as weight.This information is stored at a particular value or weight.In multi-layer perception uses the Backpropagation algorithm.The following are the steps of this research.

Dataset
The type of data used in this research is secondary data.This data is data that comes from kaggle.This data has information about 768 female patients.The types of data are shown in Table 1

Architecture backpropagation
In this research, the machine learning model used is the multi-layer perceptron.The steps for this model have been carried out by [12], which applies the backpropagation algorithm.In this research, testing was carried out using several scenarios, including initializing the hidden layer and increasing the number of iterations.Figure 2 illustrates the backpropagation architecture with input layer 8, hidden layer two, and output layer 1.

Evaluation Model
A confusion matrix is used in research to evaluate the multi-layer perceptron model.The confusion matrix is a table that states the number of test data that are correctly classified and the number of test data that are incorrectly classified [13].The table for the confusion matrix is shown in Table 2.After creating the confusion matrix table, the accuracy value is then calculated using Equation 1, then presisi using Equation 2, Recall using Equation 3, And f1 score using Equation 4 [14].

Table. 2 Confusion Matrix
(1) (2) (3) Model validation will also be carried out using kfold cross-validation in the research.This is done so that all data has the same training and testing rights.Apart from that, in validation using k-fold crossvalidation, the accuracy value can increase [15].

RESULT AND DISCUSSION
The dataset in this study was taken from Kaggle, which can be accessed openly via the following link: https://www.kaggle.com/datasets/akshaydattatraykhare/diabetes-dataset.This data is divided into two categories: data with classes 0 and 1.The data distribution from each class is 500 for class 0 and 268 for class 1, as shown in Figure 3.

1 Experimental result
The research's experimental process consists of adding hidden layers and the number of iterations, with six trials.For dataset division, 80% training data and 20% test data.The testing process was also validated using k-fold cross-validation with 10-fold.The experimental results for the confusion matrix are shown in Figure 4, with the highest accuracy results, and all experiments are shown in Table 3.

Determination of hidden layers
In experiments on research into the classification of diabetes in women using a multi-layer perceptron, the process of determining hidden layers was carried out in 3 types, namely 2, 5, and 7.The experimental results show that initializing the hidden layer with the number 7 has excellent model performance.Where an accuracy value of 75% is obtained.Then, when validation was carried out using k-fold crossvalidation, the average accuracy value for hidden layer 7 obtained an accuracy value of 78.01%.

Determination of the number of iterations
Apart from determining hidden layers, this research also tested by determining the number of iterations.There are two initializations for the number of iterations carried out in the classification of diabetes in women, namely 5000 and 10.000.Based on experimental results, especially for the dataset used in this research, determining the number of iterations does not affect the model's performance for diabetes classification.

Results of precision, recall, and f1 score
Apart from the testing process by calculating accuracy values, this research also calculated precision, recall, and f1-score values.The same is valid for calculating accuracy.This study's precision, recall, and f1 scores were highest when hidden layer seven was used.Precision was 77.24%, recall was 72.58% and f1 score was 76.86%.All experimental results are shown in Table 4.The recall value differs from the others based on the precision, recall, and f1 score analysis results.In this case, the recall analysis is the percentage of data predicted to be positive for diabetes compared to the actual data for diabetic students.This occurs because the amount of data on the positive label (1) is not balanced with harmful data (0).

Validation results with k-fold cross-validation
There is a difference between calculating accuracy without validation and using validation.When validating using 10-fold, the average accuracy experienced a very significant increase, especially in the hidden layer five scenarios.Before validation, the resulting accuracy was 71%, but after being validated 10-fold, the average accuracy was 77.04%.The accuracy value increased by 6%, especially in hidden layer 5.The difference in results without validation and using k-fold cross-validation is shown in Figure 6.

CONCLUSION
Based on the results of experiments that have been carried out show that determining the number of hidden layers can influence the performance of the multi-layer perceptron model in the classification of diabetes mellitus in women, where the highest accuracy value was obtained when using hidden layer 7 with an accuracy value of 75%, precision 77.24%, recall 72.58 and f1 score 76.86%.Meanwhile, determining the number of iterations cannot affect the performance of the multi-layer perceptron model, especially on the dataset used in the research.Then, the data validation process can increase the accuracy of diabetes mellitus classification.Especially in the scenario with the initialization of hidden layer 5, accuracy increased by more than 6%.Apart from that, in the future, research can be carried out to handle unbalanced data; this can be seen in the recall value, which has a very significant difference with the precision, accuracy, and F1 score values.

Figure 3 .
Figure 3. Distribution of class

Figure 4 .
Figure 4. confusion matrix with the highest accuracy

Figure 6 .
Figure 6.Comparison results using validation and without validation. .

Table 3 .
Experimental results