Optimization of the Fuzzy Logic Method for Autism Spectrum Disorder Diagnosis

Diagnosis of autism spectrum disorder (ASD) can use a fuzzy inference system. The use of fuzzy logic method to obtain ASD diagnosis results according to experts based on the limits of factors/symptoms of the disease and all the rules obtained from experts. Recommendations for therapy and preventive actions can be given by experts after knowing the results of the diagnosis of ASD using the fuzzy logic method. This study serves to diagnose ASD by optimizing each degree of membership in the fuzzy logic method with the Mamdani method approach which is involved in the autism detection process involving 96 patient data. The Mamdani method itself can process an uncertain value from the user/patient into a definite value whose membership degree can be determined and adjusted to the conditions of the problem. Optimization was carried out on the degree of membership for all variables involved in the process of diagnosing ASD, namely social interaction, social communication and imagination and behavior patterns. The results of this study indicate a relatively small level of fuzzy calculation error with a precision value of 94.4%, a recall precision value of 65.4% and an error rate value of 3.05%. Calculation of accuracy shows a result of 90.59%.


Introduction
The healthy development of children and in accordance with the pattern of growth and development as children get older is of course the hope of every parent for their beloved baby. However, there are several cases that occur related to the development of early childhood disorders. Some examples of child development disorders that often occur are gross motor development disorders, fine motor development disorders and autism that attacks children or what in medical terms is called autism spectrum disorder [1], [2]. The initial diagnosis that may be noticed in autistic people is how to communicate with the other person, how the child interacts with friends and the environment and the last is how the child imagines which can be seen from the results of the picture [3], [4]. These disorders can be observed and can be identified as early as possible the symptoms that occur for later consultation with experts in the field, in this case is a pediatrician or psychologist [5].
The existence of experts can be replaced with a system that stores knowledge about a field in detail and specifically which is then called an expert system [6], [7]. By inputting all the symptoms that occur in children into the knowledge base of the system, the expert system can be used to diagnose developmental disorders that occur without time and place restrictions [8], [9]. This means that consultation to find out the disorders experienced and the illness can be done anytime and anywhere [10], [11]. The symptoms that occur are used to identify the disease so that the cause of the disorder can be searched. In addition to finding the cause, it can also be used to find the most appropriate therapy for the disease and disorders experienced by the patient [12].
The initial process of the expert system is diagnosing the disease by identifying the symptoms that appear. Usually, problems arise in the diagnosis process due to unclear information which results in inaccurate disease diagnosis results. Fuzzy logic is very flexible to changes and uncertainties of the problem, so the disease diagnosis process is more suitable to use this method because of this. One of the studies that can provide solutions to these problems is research [13] which developed a fuzzy-based expert system called the Pain Intensity Prediction Expert System (PIPES). The expert system is used to predict pain severity risk (PSR) in shoveling-related tasks. The results obtained are Pain Intensity Prediction Expert System (PIPES) can be implemented for the construction industry, sand mining sites, and other worksites where the work materials can be moved using a shovel manually. The use of fuzzy logic itself has been widely implemented to diagnose a disease, such as an eye disease [14], diphtheria disease [15], polyneuropathy [16], ENT disease [17], and oral and dental disease [18].
The difference between this study and previous studies is the optimization of membership degrees for the variables used to diagnose ASD, namely social interaction variables, social communication variables and imagination variables and behavioral patterns. The Mamdani method approach still applies the same theory as the Tsukamoto fuzzy method, namely by changing an uncertain value into a definite value from patient input [19]. Determination of functions, degrees of membership and representation curves can be determined independently by adjusting the conditions of the problems encountered [20]. After the value of the user input is translated using the fuzzy logic method into a definite value, the next step is to determine the probability value of each symptom/input by the user, namely patients with autism. The data used in this study were data samples from the Banyumas hospital in the period January to August 2021. There were 96 patients indicated to suffer from ASD. This is known from the initial history which concludes that some of the symptoms experienced by the patient lead to ASD. Furthermore, in this study, the data is used to optimize the degree of membership in each of the variables involved. The purpose of this study was to determine the level of accuracy of the comparison of expert diagnoses in this case psychologist and the results of this study were fuzzy logic optimization to detect ASD in 96 patients.

ASD (Autism Spectrum Disorder)
The variables used to classify the symptoms of autism spectrum disorder are divided into 3 (three) variables [21], including: Social Interaction. Symptoms included in social interaction variables, namely inadequate social interaction which is characterized by uninspired eye contact, facial expressions that are too flat, uncontrolled movements and lack of focus, not responding when called upon, refusing to be hugged, not interested in new things such as toys, suddenly crying or laughing for no reason, playing with unusual objects such as not toys in general [22]. The second symptom is usually the patient cannot play and interact normally with peers [23]. The third symptom is that patients with ASD lack empathy, this is characterized by the patient not responding to events experienced by others. The last symptom in this variable is the lack of social and emotional connection to the surroundings [24].
Social Communication. For symptoms on social communication variables, the first is the delay in speaking and there is no attempt to catch up with the delay, withdrawing the hand when you want something [25]. The second symptom is able to speak but not to communicate with other people [26]. The third symptom is the frequent use of strange and repeated language. The last symptom is showing how to play is monotonous, less varied, less imaginative and less able to imitate [27]. Imagination and Behavioral Patterns. The last variable is imagination and behavior patterns, where the symptoms include the first to maintain one or more interests in a typical and excessive way [28]. The second symptom is fixation on one activity that is usually done and less useful [29]. The next symptom is that there are repetitive and unusual movements. The latter symptom is often too much focus on one part of the object [30].

Expert System
Fuzzy logic can be interpreted as a precise mapping of an input space into an output space [33]. Fuzzy logic is usually used for solving a complex problem by adding new input functions to the fuzzy system where the system works based on the principles and rules associated with it [34]. To deal with complex problems and difficult to define with a mathematical model with an approach reasoning process, this fuzzy system is good enough to be implemented [35]. The reasoning ability of the fuzzy system is almost similar to the ability of human reasoning where the fuzzy system can provide a response to qualitative, inaccurate and ambiguous information [36]. Some of the reasons for using fuzzy logic are that fuzzy logic is very flexible, has tolerance, is easy to understand, whereas the mathematical concepts underlying fuzzy reasoning are very simple [37]. Fuzzy reasoning can model very complex nonlinear functions and can build and apply the experience of experts directly without going through the training process [38].  Figure 1 describes the environment for consulting and the environment for expert system development. In the consulting environment, there are several components such as an application/system user interface that can be used by expert system users to consult about something, in this case, consultation to find out autism spectrum disorder [31]. Then there is a component about the symptoms experienced by ASD sufferers in which the component is described in detail about each symptom that the patient may or may not experience [32]. There is an inference engine that exists in the expert system development environment [13]. The function of the inference engine in the expert system is used to trace the reasoning process to a condition experienced based on a knowledge base of available facts and rules [6]. In the development environment, there is expert knowledge about a field that is absorbed by knowledge engineering to be translated into facts and rules which will later be used in the knowledge base and correlated with the inference engine in the expert system [33]. In this study, the expert is a paediatrician and a psychologist who provides knowledge about autism spectrum disorder which consists of symptoms experienced and therapy that can be done by observing patients [3]. Then the knowledge of the two experts is processed into facts and rules that are placed into the knowledge base of an expert system for diagnosis of ASD by a knowledge engineer [34].

Fuzzy Logic Method
Fuzzy logic can be interpreted as a precise mapping of an input space into an output space [30]. Fuzzy logic is usually used for solving a complex problem by adding new input functions to the fuzzy system where the system works based on the principles and rules associated with it [31]. To deal with complex problems and difficult to define with a mathematical model with an approach reasoning process, this fuzzy system is good enough to be implemented [32]. The reasoning ability of the fuzzy system is almost similar to the ability of human reasoning where the fuzzy system can respond to qualitative, inaccurate and ambiguous information [33]. Some of the reasons for using fuzzy logic are that fuzzy logic is very flexible, has tolerance, is easy to understand, whereas the mathematical concepts underlying fuzzy reasoning are very simple [34]. Fuzzy reasoning can model very complex non-linear functions and can build and apply the experience of experts directly without going through the training process [35]. Figure 2 describes the fuzzy logic flowchart, with the following stages: The first stage is to enter the fuzzy set in the expert system for the diagnosis of ASD, then proceed with the selection of the type of membership function curve for the fuzzy set that is determined for each variable involved. Later the degree of membership used will be the value of each variable in the fuzzy set [35]. The second stage in this method is determining the degree of membership (µ) for each variable involved and making rules which will be used to calculate the predicate value of the rule (α). The combination of each variable with other variables that are used together with the rules made with their respective language attributes [36]. Determination of the rule using the following rules: [K1] IF P And Q THEN R To determine the next rule using these rules and adapted to the conditions of the problem.
The next step is to defuzzification by finding the value of the moment (Mn) and area (A) using the centroid method [37].
The fourth stage is calculating the predicate rule (α) which is used in the knowledge base of the expert system for the variables that have been inputted into the fuzzy set. The calculation of the value of the rule predicate is obtained from the process of implication of each rule. The min operation is used in the Mamdani method of implication process, while the rule predicate value is obtained by entering the minimum value of the degree of membership between the variables that have been combined in a predetermined rule [38].
The last step in this method is to determine the output value (Z) based on the membership function and analyze the composition between the rules created and create a membership function [19]. The formula used to determine the output value is as follows: The trapezoidal curve representation picture above can be explained that the initial input is x as the membership value and is processed to produce a decision if [39]: ≤ dan ≥ , then the degree of membership µ (x) = 0; ≤ ≤ , then the degree of membership is calculated using the formula: ≤ ≤ , then the degree of membership µ (x) = 1; ≤ ≤ , then the degree of membership is calculated by the formula : Figure 4 describes the flowchart of the process description on the trapezoidal curve representation. While Figure 5 describes a curve in the form of a shoulder where the middle area of a variable is represented in the form of a triangle which on the right and left sides goes up and down. This shoulder curve is used to terminate an area of fuzzy variables. The left shoulder curve moves from a true statement to a false statement while the right shoulder curve moves from a false statement to a true statement [19].    For social interaction variables, the fuzzy set curve shows 2 (two) categories, namely there is one symptom shown by the patient and none of the symptoms shown by the patient. The lower threshold value is at the point and the upper threshold value is at the point.  For ASD disease indication variables, the fuzzy set curve shows 2 (two) categories, namely ASD indicated and not ASD indicated. The figure for the membership function curve is as follows:

Predicate Rule, Defuzzification and Output Value
The data of 22 disease symptoms as shown in table 1 is used to enter in diagnosing ASD which has the same parameters, namely for codes SI01 to SI12 it has 2 parameters, namely Yes and No, SC01 to SC06 has 2 parameters, namely Yes and No and IBP01 to IBP04 has 2 parameters, namely Yes and No.
For example, the case is a patient with an SI variable of 9, a SC variable of 5.5 and an IBP variable of 3, so to solve the case, start by determining the rules used to diagnose ASD. The application of the implication function used is the MIN rule, while the method used to perform the composition between all the rules is the MAX method. Then proceed with calculating the predicate value obtained from the minimum value of the fuzzification results for each rule that matches the input value of the symptoms experienced using equation (1), and continues to find the Z value with equation ( Table 3 shows the rules of the expert system for diagnosing autism spectrum disorders that attack children. The rule is built after the fuzzy set for each variable is determined by its value. This expert system rule is one part of the expert system structure, namely the knowledge base. The knowledge base is very necessary for the design of expert systems because through this knowledge base it is defined input from the user in the form of symptoms, translated through rules and determined values to then produce conclusions on a problem encountered. For this expert system, the output is a recommendation for therapy used for patients with ASD (Autism Spectrum Disorder).  from the minimum value of the fuzzification results for each rules that match the symptom input. Process fuzzification calculation to find -predicate using equation (1), and after getting the value of -predicate can be the value of z is obtained by equation (2), it is shown as following: [R01] If SI max and SC max and IBP max then Indicated ASD The following are the results of the calculation of αpredicate and z value for R01 until R08 which are shown in table 4. Then the last step of calculating the fuzzy logic method is to find the Z value using equation (3) based on the membership function and compositional analysis between existing rules, then the Z value is obtained by: From the calculation above, it can be concluded that the diagnosis of the fuzzy logic disease has a value for positive patients of 8.26. Based on the results of a trial of 96 patients, 77 patients were diagnosed with ASD and 19 patients were not diagnosed with ASD. These results were compared with expert diagnoses with 96 data from the same patient, where an expert in this case a psychologist based on the same variable indicated that there were 85 patients with ASD and 11 patients who were not indicated to stay with ASD. It can be concluded that the ASD diagnosis has been successfully carried out Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi) Vol.  Based on these predictions, ASD positive patients receive therapy according to the direction of experts and for future monitoring, it must still be carried out according to expert recommendations.

Conclusion
The fuzzy calculation error rate is relatively small, so this expert system can be used in helping the public to find out the symptoms of autism early on because the precision is 94.4%, the recall precision is 65.4% and the error rate is 3.05%, while the diagnostic accuracy between experts with the fuzzy method is 90.59%. Further consultation with experts or child psychiatrists must still be carried out for the monitoring process in the future Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi) Vol.