An Expert System Using Certainty Factor for Determining Insomnia Acupoint

In treating insomnia patients, acupuncturists who are not always in their clinics trust their patients to their assistants but because of their assistants limited knowledge, their assistants can not determine the right acupoints. Therefore, an application that able to store their knowledge about insomnia disease treatment is needed so that their assistants can handle the patients like they do. In this research, an expert system application using certainty factor method to determine the acupoint in dealing with insomnia disease was built. This research used certainty factor to accommodate uncertainty about symptoms and rules. The mechanism of certainty factor on symptoms used a measure of increased belief (MB) and a measure of increased disbelief (MD). The built expert system resulted acupoints based on symptoms experienced by insomnia patients. Accuracy value produced by the system that used certainty factor for determining acupoint dealing with insomnia is 0.933. It showed that the acupoint produced by the system is 93.3% relevant according acupuncturist expertise in treating insomnia patients. Keywords— Expert System, Certainty Factor, Acupuncture, Insomnia  ISSN (print): 1978-1520, ISSN (online): 2460-7258 IJCCS Vol. 12, No. 2, July 2018 : 119 – 128 120


INTRODUCTION
Insomnia is a common health problem in modern society. Insomnia is the most commonly reported sleep disorder [1] and occurs in 10% to 30% of the adult population [2]. This sleep disorder is often associated with more than one cause including psychological factors and lifestyle, such as excessive stress associated with a life event or associated with work, depression, anxiety, and other health disorders [3]. Insomnia can be treated with various treatments with pharmacological, nonpharmacological, and alternative therapies, such as acupuncture [4].
Acupuncture is a traditional treatment that stimulates some acupoints on the skin by inserting a needle into that point. Practically and clinically, acupuncture has many advantages, namely cheap, accessible, and does not require special tools as well as on other medical techniques [5]. Acupuncture has been one of the most significant components of health systems in East Asia for thousands of years. This treatment has grown rapidly as a way of therapy in modern western medicine systems that over the last few decades and began to attract to be studied and used because of the high success rate in handling various health problems [6], such as insomnia.
Acupuncture treatment in Indonesia is relatively rare and can be found in big cities. Acupuncture clinic is available in few places and sometimes insomnia patients who take acupuncture therapy can not be immediately handled. Therefore, when acupuncturists is not in their clinic, they delegate their assistants to do the treatment by guiding them indirectly. Without their directions, their assistants can not determine the right acupoints. Therefore, a system that can store knowledge of acupuncturist related with handling of insomnia diseases is needed so that their assistants can handle the patients like they do. The right system to record an expertise of expert is an expert system. Expert system is defined as an intelligent computer program that uses knowledge and inference procedures to solve problems that are difficult enough to require significant human expertise for their solution [7]. A lot of research using expert system as a tool in the field of health has been done. [8] has built an expert system with Mamdani Product to determine the daily menu of people with diabetes mellitus based on daily caloric needs whereas the daily menu provided includes breakfast menu, lunch, dinner and snack. [9] has built an expert system to detect the level of risk of coronary heart disease by the Dempster-Shafer method. [10] has built an expert system using forward chaining to detect schizophrenia. [11] has built an expert system using certainty factor to detect rice diseases. An expert systems using certainty factor and Dempster-Shafer methods to diagnose diseases in dogs has been done by [12]. [13] has built an expert system to diagnose childhood illness with a certainty factor method.
[14] has built expert systems using multilayer neural network and ontology-based modeling methods to diagnose Parkinson's disease. Therefore, expert system can also be used as a tool to determine the acupoints in dealing with insomnia diseases.
In this research, expert system using certainty factor method (CF) to determine the acupuncture point in dealing with insomnia disease has been built. The use of certainty factor is used to accommodate the uncertainty of symptoms and rules.

Expert System
According to [7], expert system is defined as an intelligent computer program that uses knowledge and inference procedures to solve problems that are difficult enough to require significant human expertise for their solution. That is, an expert system is a computer system that emulates the decision-making ability of a human expert. The term emulate means that the expert system is intended to act in all respects like a human expert.
An expert system consists of several components such as user interface, explanation facility, working memory, inference engine, agenda, and knowledge acquisition facility. User interface is the mechanism by which the user and the expert system communicate. Explanation facility explains the reasoning of the system to a user. Working memory is a global database of fact used by the user. Inference engine makes inferences by deciding which rules are satisfied by facts or objects, prioritizes the satisfied rules, and executes the rule with the highest priority. Agenda is a prioritized list of rules created by the inference engine, whose patterns are satisfied by facts or objects in working memory. Knowledge acquisition facility is an automatic way for the user to either knowledge in the system rather than by having the knowledge engineer explicitly code the knowledge. These components are shown in figure 1 [7]. Figure 1 Structure of a rule-based expert system Expert system have a number of attractive features. Firstly, expertise is available on any suitable computer hardware. In a very real sense, an expert system is the mass production of expertise. Secondly, the cost of providing expertise per user is greatly lowered. Thirdly, expert systems can be used in environments that might be hazardous for a human. Fourth, the expertise is permanent. Unlike human experts who may retire, quit, or die, the knowledge of expert system will last indefinitely. Fifth, the knowledge of multiple experts can be made available to work simultanously and continuosly on a problem at any time of day or night. The level of expertise combined from several experts may exceed that of a single human expert. Sixth, expert system increase confidence that the correct decision was made by providing a second opinion to a human expert or tie-breaker in disagreements among multiple human experts. The expert system should agree with the expert, unless a mistake was made by the expert, which may happen if the human expert is tired or under stress. Seventh, the expert system can explain in detail the reasoning that led to a conclusion. A human may be too tired, unwilling, or unable to do this all the time. This increases the confidence that the correct decision is made. Eighth, fast or real-time response may be necessary for some applications. Depending on the software and hardware used, an expert system may respon faster and be more available than a human expert. Ninth, expert system is steady, unemotional, and complete response at all times. This may be very important in real-time and emergency situations when a human expert may not operate at peak efficiency because of stress or fatigue. Furthermore, the expert system may act as an intelligent tutor by letting the student run sample programs and explaining the reasoning of the system. Moreover, expert systems can be used to acccess a database in an intelligent manner. Data mining is an example [7].

Certainty Factor
The degree of confirmation was originally defined as the certainty factor (CF). The certainty factor is a way of combining the measures of belief and disbelief into a single number. This certainty factor show the degree of confirmation in a hypothesis based on some evidents. This measure certainty factor formulas are shown in equation (1) and equation (2) In equation (1), CF is the certainty factor in the hypothesis due to evidence whereas MB is the measure of increased belief in hypothesis due to evidence and MD is the measure of increased disbelief in hypothesis due to evidence. In equation (2), CF(H,E) is the certainty factor of hypothesis assuming that the evidence is known with certainty, when CF=1 whereas CF(E,e) is the certainty factor of the evidence E making up the antecedent of the rule based on uncertain evidence e and CF(H,e) is the certainty factor of the hypothesis based on uncertain evidence e.
Furthermore, the method for combining evidence in the antecedent of a rule are shown in table 1.

System Analysis
This research used certainty factor method to determine the acupoints based on the symptoms of insomnia diseases which are entered into the expert system. This system requires two types of users, the acupuncturist as the first user who fills the knowledge base with data acupoint along with insomnia disease data, and acupuncturist assistant as a second user who enter symptom data from patients.
The used knowledge in this system was derived from various literature that includes knowledge related with insomnia disease treatment with acupuncture and interviews with acupuncturists. The knowledge which contained symptoms, level of expert confidence, and acupoints was presented in rules of production or IF-THEN form.
This research used 47 symptoms that may be experienced by patients and 89 acupoints packed in 42 groups based on the categories suggested by the expert. Each symptom was incorporated into several production rules, where each production rule has a certainty factor of each. The value of this belief is given by the expert so that the value of this belief is subjective, where different experts can give different values of confidence to a production rule that is in the knowledge base.

System Architecture
Based on the system analysis, the design of system architecture of this research is shown in Figure 3. The way of the system works ilustrated by a flowchart shown in Figure 4.

Knowledge Representation
Knowledge representation is done after the process of knowledge acquisition. This is done to help coding knowledge into the program. This research used rules of production as the knowledge representation.

Inference Method
This research used certainty factor as inference method. The system displays all symptoms of insomnia. Then, the acupuncturist assistant as the user selects the matched symptoms with the patient's complaints. Furthermore, the user must enter a value of confidence (MB) and a value of uncertainty (MD) with a value between 0 to 1 on each symptom that has been selected. Then the system calculated CF symptom with equation (2) for each selected symptom based on MB value and MD value entered.
The inference engine matched symptoms with rules in the knowledge base. The symptoms are checked and found in the rules of the database. Furthermore, the system calculated CF value with equation (3). From this calculation, the acupoint of the rule with the highest final CF value will be the conclusion of the system. Calculation flowchart of this system is shown in Figure 4. In equation (3), n is the number of evidences corresponding to the antecendent of the rule whereas x is the number of evidences contained in the antecendent of the rule. CF (H, e) is a certainty factor (CF) of the hypothesis (H) based on uncertain evidence e. Moreover, CF (E 1 , e) is a certainty factor (CF) of evidence E from first antecendent of the rule based on uncertain evidence e. Furthermore, CF (En, e) is a certainty factor (CF) of the evidence E from n th antecendent of the rule based on uncertain evidence e. In addition, CF (H, E) is a certainty factor (CF) of the hypothesis (H) assuming that the evidence is known for certainty, when CF (E, e) equals 1.

Testing Design
Testing is needed to find out the output system used for evaluation of deficiencies and the excess system made. System testing is done by input data provided by the patient and tested by an acupuncturist. The test results will evaluate the acupoints accuracy value on expert knowledge using confusion matrix. The formula used to calculate the value of accuracy can be seen in the equation (4) [15].
In equation (4) On the other hand, the false positive (FP) and false negative (FN) value in equation (4) is not matched calculation result. The false positive (FP) value is the value of which result is predicted as the correct value but it is actually the wrong value. The false negative (FN) value is the value that the system classifies as an incorrect value but the fact is included in the correct value.

RESULTS AND DISCUSSION
After codes for this expert system with certainty factor method has been implemented, 30 experiments are conducted to evaluate the proposed method. Discussions were conducted on one of 30 cases with different inputs. The discussion includes an output comparison of result from 30 cases that have been tested with systems which have been built with the results of the experts. The result of first experiment result is shown in Table 2.   have one or more of the  corresponding symptoms with the selected symptoms in the first experiment are rule 8, rule 9,  rule 10, rule 11, rule 15, rule 16, rule 19, rule 27, rule 28, rule 29, rule 30, rule 41, and rule 42. From the calculation using the certainty factor of the rules, it is found that the KT27 as the solution which had the final CF of 0.53.
The comparisons of the system results and expert calculations are performed after system testing done. The comparison of 30 test data toward the results of the acupoints obtained by the established system and the results obtained from the expert are shown in Table 3. 127 determining acupoint dealing with insomnia is 0.933. It showed that the acupoint produced by the system is 93.3% relevant according to acupuncturist expertise in treating insomnia patients.

CONCLUSIONS
From this research, it can be concluded that the developed expert systems using certainty factor method can result in the output of acupoints corresponding to the symptoms of insomnia patients. Furthermore, the accuracy value of the expert system results on the acupuncturists expertise in handling insomnia patients is 93.33%. Moreover, the expert system can provide conclusions according to the rules even though the symptoms which inserted by the user is incomplete.