Expert System for Diagnosing Inflammatory Bowel Disease Using Certainty Factor and Forward Chaining Methods

Identification of inflammatory bowel disease quickly and accurately is motivated by the large number of patients who come with pain in the abdomen and receive minimal treatment because they are considered to be just ordinary abdominal pain. This study aims to identify inflammatory bowel disease which is still considered by some people as a common stomach ache quickly, and precisely and to recommend therapy that can be done as an initial treatment before getting medical action by medical personnel. The method used in this expert system research is a combination of forward chaining and certainty factors. The forward chaining method traces the disease forward starting from a set of facts adjusted to a hypothesis that leads to conclusions, while the certainty factor method is used to confirm a hypothesis by measuring the amount of trust in concluding the process of detecting inflammatory bowel disease. The results of this study are a conclusion from the process of identifying inflammatory bowel disease which begins with selecting the symptoms experienced by the patient so that the diagnosis results appear using forward chaining and certainty factor in the form of a percentage along with therapy that can be given to the patient to reduce pain in the abdomen. A comparison of the diagnosis results using the system and diagnosis by experts, in this case, specialist doctors, shows an accuracy rate of 82,18%, which means that the expert system diagnosis results can be accounted for and follow the expert diagnosis.


INTRODUCTION
Inflammatory bowel disease is a disease that is usually detected by symptoms of pain in the stomach [1].Sometimes patients do not know from an early age that the abdominal pain they feel refers to inflammatory bowel disease [2].This disease is usually characterized by diarrhea over a long period, bloody stools, and over time the patient's weight will decrease [3].Inflammatory bowel disease is an autoimmune disease, this means that patients with this disease have an immune system that attacks their own body and often occurs in the digestive tract [4].Inflammatory bowel disease is broadly divided into four categories of intestinal disease, namely ulcerative colitis, collagenous colitis, lymphocytic colitis, and Crohn's disease [5].The cause of this disease is usually triggered by stress and excessive diet which can worsen the initial symptoms experienced by the patient.One possible cause of this disease is that there is a malfunction in the patient's immune system [6].This means that the immune system, which is supposed to fight bacteria and viruses, actually attacks the lining of the intestinal walls of patients who suffer from this disease, resulting in disruption of intestinal function [7].Several factors that may increase the risk of inflammatory bowel disease are age, family history of the disease, smoking which can also increase the risk factors for this disease, and consumption of certain medications over a long period [8].Symptoms that patients with JINITA Vol. 5, No. 2, December 2023 DOI: doi.org/ 10.35970/ jinita.v5i2.2096inflammatory bowel disease may experience include prolonged diarrhea, fever, body discomfort, abdominal pain, stomach cramps, blood in the stool, decreased appetite, and significant weight loss over a certain period [3].Diagnosis that can be done to find inflammatory bowel disease early is divided into two, namely medical examination and early detection using an expert system.
Medical examinations that can be carried out after consulting with a specialist doctor include laboratory tests which include blood tests and examination of the patient's stool [9].Endoscopic examination involves inserting a camera through a flexible tube into the intestine to determine the condition of the large intestine in detail.Imaging examinations that can be carried out to determine the severity of inflammatory bowel disease are X-rays, CT scans, and MRI [10].These three examinations can help doctors find out exactly what is happening in the patient's intestines [11].The second examination that can be carried out to determine inflammatory bowel disease is by using an expert system that can detect early inflammatory bowel disease suffered by the patient [12].An expert system is an intelligent system that contains some knowledge from an expert regarding a specific field [13].Expert systems are one of the scientific branches of artificial intelligence (AI).An expert system aims to recommend a series of actions that can be taken to obtain a solution to a particular problem [14].The structure of an expert system includes a user interface, knowledge base, knowledge acquisition, inference engine, workplace, and facilities for explaining and improving knowledge [15].An expert system for early diagnosis of inflammatory bowel disease copies the knowledge of an expert, in this case, a specialist in internal medicine, into a knowledge base so that it can be used as an inference machine in diagnosing, starting with selecting the initial symptoms experienced by the patient [16].
Several studies have been carried out, including by [17].This research discusses the identification of inflammatory bowel disease using the Dempster-Shafer method.This method performs calculations by calculating the possibility of inflammatory bowel disease found in the patient.Starting with initializing the symptom data, forming a rule base, determining the belief value and plausibility value, carrying out calculations using the Dempster-Shafer method, and finally concluding the diagnosis results.The diagnosis results are displayed in an expert system information system that has been tested using black box testing.The second research was conducted by [18].This study implemented the Dempster Shafer method to diagnose small intestine disease.This method is used to find diagnostic confidence from the initial symptoms experienced.This research aims to make it easier for the public to know what small intestine disease they are suffering from and to be able to check it early.The research stages begin with identifying the problem, collecting data through interviews and literature studies, then continuing with analyzing the problem and ending with applying the Dempster-Shafer method to start the diagnosis process.The process of searching for diagnostic confidence uses the Dempster Shafer method where the final results of this research produce an accurate diagnosis with symptom data as a sample of 32%, this means that the diagnosis results show a small possibility of suffering from small intestinal obstruction.Subsequent research was carried out by [19], [20], [21], and [22] who also researched to detect digestive diseases early.
The difference between the research carried out and research that has already been carried out is that in this study the method will be combined with a forward tracing flow, namely the forward chaining method which begins by tracing the symptoms experienced by the patient, then the symptom data is adjusted to a hypothesis which will later lead to a conclusion., where the conclusions obtained are measured by the confidence value (MB) and the distrust value (MD) is also calculated to ensure that the hypothesis is a validated result in the process of early detection of inflammatory bowel disease.The flow of tracking inflammatory bowel disease uses the forward chaining method because this method can work optimally and well to detect inflammatory bowel disease with limited existing data, namely data on symptoms of inflammatory bowel disease.Meanwhile, the certainty factor method was chosen to diagnose inflammatory bowel disease because the calculation process using this method was limited to only two data so the accuracy of the data was well maintained.The reason for combining these two methods is so that the accuracy of calculations based on trust values using the certainty factor method is well maintained because it is preceded by a hypothesis tracing process using the forward chaining method.Data was obtained from interviews with several patients who were indicated to have inflammatory bowel disease, where the patient experienced continuous abdominal pain so action was taken by medical personnel, namely internal specialist doctors, to carry out intensive examinations to determine the cause of the abdominal pain.Interviews were also conducted with internal medicine specialists who acted as experts.Apart from that, data was also obtained from literacy studies of several similar journals.JINITA Vol. 5, No. 2, December 2023 DOI: doi.org/ 10.35970/ jinita.v5i2.2096

METHOD
The structure of the expert system is explained in Figure 1.An expert system is an information system that matches or imitates the expertise of an expert in a specific field [23].The purpose of an expert system is to recommend a series of activities or actions that can be used to solve a particular problem based on the knowledge base of an expert that has been acquired into rules [24].The expert system structure consists of two environments, namely the developer environment and the consulting environment [25].The development environment includes a knowledge base that contains a collection of rules and facts that contain formulas and schemes for solving problems, acquisition of knowledge from an expert who is an expert in a field into rules in an expert system, and a workplace that is an area from the working memory pool to record every event that occurs [13].Whereas the consulting environment contains an inference engine in which there is a reasoning mechanism and mindset of experts to solve a problem, a user interface that can be used to conduct consultations such as selecting the symptoms experienced by patients who experience pain in the abdomen, therapeutic recommendations that can be carried out to patients with abdominal pain, and an explanation of the facilities available in the expert system [26].

Forward Chaining Method
The forward chaining method is an expert system method that can search or track forward or future flows [23].The process begins with tracking information such as data on disease symptoms provided by the user and then searching on a knowledge base that is tailored to the rules and facts that allow combining rules to produce a conclusion [15].The forward chain of this method uses a set of condition and action rules [27].The data used is later matched to determine which rules will be executed, and the process is repeated continuously until a conclusion is found from the problem being solved [28].The forward chaining method enters into a multiple inference group that can search from a problem to a solution to that problem [29].The advantage of the forward chaining method is that this method can work with good performance if the problem starts with gathering information and then proceeds to find conclusions that can be drawn from that information [30].This method can also provide a lot of information even though the initial data is only small [31].
Figure 2 describes the process of tracing inflammatory bowel diseases by the forward chaining method.This method will conduct a search that begins with selecting the symptoms experienced by the JINITA Vol. 5, No. 2, December 2023 DOI: doi.org/ 10.35970/ jinita.v5i2.2096patient, in this case, the symptoms experienced will be stored in the knowledge base of the expert system as facts that occurred.Meanwhile, the rules that bind each symptom and are concluded to lead to disease are also stored in the knowledge base of the expert system in the developer environment.Several types of diseases caused by inflammatory bowel disease and their symptoms can be seen in Table 1 and Table 2. Table 1 shows disease data symbolized by P1 to P4 and the symptoms experienced by G1 to G9.

Certainty Factor Method
The certainty factor method is a method that performs calculations using only two data so that the accuracy of the data can be maintained [12].Certainty factors are suitable for use in expert systems that measure an uncertain problem, for example in the process of diagnosing a disease, the initial data is in the form of symptoms that may be present in several types of disease [32].The general idea of uncertainty modeling is that it uses numerical figures that can only process the uncertainty or certainty of two pieces of data [33].If there are more than two data, then the calculation process will be carried out in several stages of data processing or can be repeated until complete [34].The expert's belief value or measure of belief (MB) for each expert may be different from other experts, therefore it is recommended that when using the certainty factor method, the involvement of more than one expert is very useful so that the value of trust in an inferred problem can be objective [35].The stages of calculation using the certainty factor method begin by calculating the certainty factor value of a hypothesis that is influenced by evidence which is denoted by CF[H, E] [36].The measure of the confidence value of evidence is denoted MB[H, E], while the measure of the hypothetical distrust value for each piece of evidence is denoted MD[H, E].For cases that are determined from only one premise, the confidence value is calculated from at least two cases, while for the confidence value that is determined from two or more premises, the maximum confidence value is calculated from these cases [33].The last stage is calculating the combined confidence value for the same conclusion.The calculation for each stage is explained as follows:  The research flow described in Figure 4 shows that the research conducted began with analyzing the problems encountered and the needs used in the process of diagnosing inflammatory bowel disease.Then the results of the analysis phase result in the acquisition of knowledge obtained from collecting data about inflammatory bowel disease, such as disease data, symptom data, and what therapies can be done for patients with inflammatory bowel disease, conducting literacy studies on expert systems and inflammatory bowel disease, represent expert knowledge into rules that will be used in the search and calculation process using the certainty factor method.These rules are stored in the knowledge base of the expert system to be developed.Then the process is continued by processing symptom data, disease data, and rule data using the JINITA Vol. 5, No. 2, December 2023 DOI: doi.org/ 10.35970/ jinita.v5i2.2096certainty factor method and the forward chaining method.From this process, the results obtained from the combination of the two methods can later be implemented into the development of an expert system for diagnosing inflammatory bowel disease.The final step is documenting every activity during the research process which begins with analyzing problems and needs, up to implementing the results of the combination of the two methods into an expert system for diagnosing inflammatory bowel disease.

Inflammatory Bowel Diseases
Inflammatory bowel disease is a disease that occurs as a result of a disturbance in the digestive system.Inflammatory bowel disease (IBD) can be caused by genetic factors, meaning that genetic factors play an important role in a person developing inflammatory bowel disease if their lifestyle is not maintained properly [6].IBD disease can also be caused by the immune system [37].Usually, the human immune system is responsible for defending the body from pathogens, and organisms that cause disease and infection [38].The presence of bacteria or viruses in the digestive tract can trigger an immune response [7].This results in the digestive tract becoming inflamed as the body tries to fight off the disease-causing agent.For a state of healthy immune response, the intestinal inflammation will go away as the infection goes away [39].Different things occur in patients with intestinal inflammation.Inflammation of the digestive tract can occur when there is no infection in the body.As a result, the immune system instead attacks the cells in the body, and this is often called an autoimmune response [40].The age range that often experiences inflammatory bowel disease is between 10 years and 35 years.Environmental factors and an unhealthy lifestyle can trigger this disease to nest in the body.Several categories of inflammatory bowel disease, including: If G1 and G2 and G4 and G7 and G8 and G9 Lymphocytic Colitis R04 If G2 and G3 and G5 and G7 and G8 and G9 Chron's Disease

RESULTS AND DISCUSSION
In this section, we will discuss the combined implementation of two methods, namely the forward chaining method and the certainty factor method in diagnosing inflammatory bowel disease.The process begins with disease tracing using forward chaining followed by certainty factors with the following case examples: Patients come with complaints of abdominal pain, bleeding during bowel movements, fever, decreased appetite, and significant weight loss over some time.The data is adjusted to the symptom data in Table 2 so that the symptoms experienced can be identified by denoting the code, namely G1, G4, G5, G6, and G7.The first stage begins with conducting a search using the rule in Figure 2, where the conclusion to be sought is the category of inflammatory bowel disease based on the symptoms experienced by the patient.Based on the rule-based expert system in Figure 2 by entering symptoms G1, G4, G5, G6, and G7, the patient is identified as having inflammatory bowel disease with the Ulcerative Colitis category.The results/evidence JINITA Vol. 5, No. 2, December 2023 DOI: doi.org/ 10.35970/ jinita.v5i2.2096were processed using the certainty factor method which started from a hypothesis, namely the patient experienced symptoms G1, G4, G5, G6, and G7.By using the certainty factor calculation, the process is as follows: a.Looking for the trust value of users and the trust value of experts regarding the symptoms of inflammatory bowel disease.b.After knowing the value of trust from users and experts, the process is continued by determining the CF Combine value.In this case, equation ( 3) is used because more than one premise is used.Figure 5 shows the results of calculating all symptoms experienced by the patient against probable inflammatory bowel disease for all categories.Based on the results shown in Figure 6, patients who experience symptoms of abdominal pain, abdominal pain, bleeding during defecation, fever, decreased appetite, and significant weight loss over a certain period are diagnosed with inflammatory bowel disease which falls into the category of Ulcerative Colitis with a confidence value of 0.989.These results were compared with diagnoses from specialist internal medicine experts, with the conclusions presented in Table 5, as follows: G1, G2, G3, G4, G5, G6 0,989 1 0,0109 P2 G1, G3, G5, G6, G8, G9 0,959 0,9 -0,0627 P3 G1, G2, G4, G7, G8, G9 0,963 0,9 -0,0592 P4 G2, G3, G5, G7, G8, G9 0,867 0,8 -0,0668 The resulting difference value between the system diagnosis and the expert diagnosis is calculated using the following equation: Based on the results of calculating the percentage level of certainty between the diagnosis from an expert specialist in internal medicine and the diagnosis from an expert system that implements the forward chaining method and certainty factor method, a result of 82.13% was obtained.This means that the results of the diagnosis of inflammatory bowel disease based on the symptoms experienced by the patient are accurate with the results of the diagnosis from an expert specialist in internal medicine.

CONCLUSION
Based on the research background, a combination of two methods, namely the forward chaining method and the certainty factor method, has been successfully implemented in an expert system to diagnose inflammatory bowel disease.The stages in each method are carried out alternately, starting with the disease tracing process using the forward chaining method and then continuing using certainty factor calculations starting from determining the certainty factor value up to the final stage, namely the calculation to produce the CF Combine value for the same conclusion.The results of measuring the level of accuracy between the results of the diagnosis of inflammatory bowel disease using the system and the results of diagnosis based on experts, namely specialist doctors, show that the level of similarity in diagnosis results is 82,18%.This means that the diagnosis of inflammatory bowel disease using the forward chaining method and the certainty factor method provides results that follow the diagnosis results from inflammatory bowel disease experts.

Figure 1 .
Figure 1.Expert System StructureThere are two methods used in this research, namely:2.1 Forward Chaining MethodThe forward chaining method is an expert system method that can search or track forward or future flows[23].The process begins with tracking information such as data on disease symptoms provided by the user and then searching on a knowledge base that is tailored to the rules and facts that allow combining rules to produce a conclusion[15].The forward chain of this method uses a set of condition and action rules[27].The data used is later matched to determine which rules will be executed, and the process is repeated continuously until a conclusion is found from the problem being solved[28].The forward chaining method enters into a multiple inference group that can search from a problem to a solution to that problem[29].The advantage of the forward chaining method is that this method can work with good performance if the problem starts with gathering information and then proceeds to find conclusions that can be drawn from that information[30].This method can also provide a lot of information even though the initial data is only small[31].Figure2describes the process of tracing inflammatory bowel diseases by the forward chaining method.This method will conduct a search that begins with selecting the symptoms experienced by the

Figure 2 .
Figure 2. Rule Base Expert System with Forward Chaining Method 2.2 Certainty Factor MethodThe certainty factor method is a method that performs calculations using only two data so that the accuracy of the data can be maintained[12].Certainty factors are suitable for use in expert systems that measure an uncertain problem, for example in the process of diagnosing a disease, the initial data is in the form of symptoms that may be present in several types of disease[32].The general idea of uncertainty modeling is that it uses numerical figures that can only process the uncertainty or certainty of two pieces of data[33].If there are more than two data, then the calculation process will be carried out in several stages of data processing or can be repeated until complete[34].The expert's belief value or measure of belief (MB) for each expert may be different from other experts, therefore it is recommended that when using the certainty factor method, the involvement of more than one expert is very useful so that the value of trust in an inferred problem can be objective[35].The stages of calculation using the certainty factor method begin by calculating the certainty factor value of a hypothesis that is influenced by evidence which is denoted by CF[H, E][36].The measure of the confidence value of evidence is denoted MB[H, E], while the measure of the hypothetical distrust value for each piece of evidence is denoted MD[H, E].For cases that are determined from only one premise, the confidence value is calculated from at least two cases, while for the confidence value that is determined from two or more premises, the maximum confidence value is calculated from these cases[33].The last stage is calculating the combined confidence value for the same conclusion.The calculation for each stage is explained as follows: a. Determine the value of the certainty factor [, ] =    [, ] −    [, ](1)

4 )Figure 3
Figure3shows the flowchart of the certainty factor method.

Table 1 .
Inflammatory Bowel Disease Category

Table 2 .
Data on Intestinal Inflammatory Disease Symptoms

Table 3 .
Example of Inflammatory Bowel Disease Diagnostic Rules

Table 4 .
The user CF values and expert CF values are shown in the table below: Interpretation of Experts

Table 5 .
Comparison of Expert and System Diagnosis