Implementation of Expert System for Diabetes Diseases using Naïve Bayes and Certainty Factor Methods

Expert Systems is a computer systems that has been entered the base knowledge and a set of rules used to solve problems like an expert. Methods that can be used in the expert systems which is Naïve Bayes and Certainty Factor. Naïve Bayes method can handle quantitative calculations and discreate data and only requires a little research data to estimate the parameters needed in the clasification and Certainty Factor which is suitable for measuring something whether it is certain or not in diagnosing. Diabetes is one of the most frequent diseases suffered in Indonesia. The purpose of this research is implementation expert systems used Naïve Bayes and Certainty Factor in diagnosing diabetes and knowing the level of accuracyof the systems. Data that is used by researchers as much 100 data medical record, obtained from the medical record RSUD Bendan Kota Pekalongan. The variabels used in this research is age, gender, the symptoms of the desease diabetes and result diagnose desease from expert. The accuracy rate of this system derived from the scenario distribution data 70 training data and 30 testing data that is equal to 100% according to the doctor's diagnosis.


INTRODUCTION
Expert systems is part of high-level specialized sofware or high-level programming language, which is trying to duplicate the functionality of an expert in a particular field of expertise [1].Usually expert system build to cope with the problems compound by performing reasoning using knowledge resembles the expert [2].To overcome various problems, expert systems combine the knowledge base and inference engine [3].The intent of the combining the knowledge base and the inference is adopted human knowledge into the computer, so the computer in solving problems such as commomly performed by an expert [4].In its application the problems faced by expert system is not just a problem that rely on algorithm, but also promblems that are difficult to understand.[5].Although it is difficult to understand the expert system is trying to find the completion of satisfactory, that is settlement which is quite good so the job can be run although it's not optimal completion, in other words, expert system is a system-based software which makes or evaluates decisions based on ruoles set in the software [6].The goal of expert systems is not to replace the role of humans, but a variety of material of human knowledge which is presented in the form so that is can be in use by many people [7].From some previous research of expert system give good result to finish problems that use complex data in the case of prediction or diagnosis, example diagnosis of diseases of the diabetes mellitus using Naïve Bayes method using 140 data obtained an accuracy rate of 100%, disease in cats using Naïve Bayes and Certainty Factor method with 25 data test obtained 80% accuracy rate, disease in goats using Naïve Bayes and Certainty Factor obtained accuracy rate of 86.80% [8][9][10].
Naïve Bayes form a certain probabilistic simple yang berdasarkan pada teorema Bayes in generally, inference Bayes especially with the assumption of the independence of the strong [11].Process that is classification with method probability and statistic that is predict opportunities in the future based on the experience in earlier times and to look for degrees of beliefe using Certainty Factor who have clinical parameters to show the value of trust [12].This is the factorof certainty in the contents by experts together with the rules and factor of certainty that is given by the user.
Diabetes is a disease of the metabolic characteristics hyperglemika that occurs because of abnormalities of insulin secretion, insulin action or both.Diabetes is also accompanied by methabolic disorders of carbohydrates, fats, and proteins caused by a deficiency of the hormone insulin relative or absolute.[13].When it is in let uncontrollable can occur complications of the methabolic and acurate complications of vascular long-term, better mikroangiopati and makroangiopati [14].Diabetes needs in beware of because of the nature of the disease which is a cronic progressive number of patients who increasing and a lot of negative that caused.
Based on the above description, the purpose of this research is implementation expert system with method Naïve Bayes and Certaity Factor and to know accuracy in diagnose disease diabetes.

METHODS 2.1. Naïve Bayes
Naïve Bayes a classifier is simply based on theorem Bayes combine with "Naïve" which means each attribute is independent to calculate each class of decision calculate probability with the condition that the class is true, given vector object infomation [15].The stage of the calculation Naive Bayes as follows: 1) Find the value of prior probabibilty for each class calculate the average of each class.2) Find the value of likelihood that is a process of calculating the probability of each attribute againts the class, the possibility of emergence of a class when an attribute is selected.3) Find the value of posterior that is result of calculation likelihood in the form of the probability of the attribute class, calculated to divert the possibility of (1) the attribute of the input with the class, in the process of this can be probability of the end.
Naïve Bayes method can handle quantitative calculations and discreate data and only requires a little research data to estimate the parameters needed in the classification.

Certainty Factor
Certainty Factor a method to accomodate questions from an expert in th delivery of the result of the analysis describe the level of confidence the expert to the problem being faced, [16].Calculation Certainty Factor can be formulated in formula (1).

CF[H, E] = MB[H, E] − MD[H, E]
Explanation Certainty Factor in an expert system can measure something whether it is certain or not in diagnosing the disease and in calculating the certainty factor only users two data so that the accuracy of the data can be maintained.

Data Collection
The data used in this study is the result of medical records of 100 patients data year of 2016 and 2017 who suffer from particular disease in whom type1 diabetes, type 2, gestational, and type in take in RSUD bendan Pekalongan, data that is used in the form of age, gender, symptoms experienced patients in RSUD Bendan and the doctor's diagnosis of the doctor responsible.

Interview
Interview done by internal disease specialist doctor who is the doctor in RSUD Bendan, from the results of the interviews produced the weights of each symptom in diabetes is show in Table 1.The onset of ulcers(sores) on the leg that never healed.
Previously never been sick a particular disease and consuming drugs that can distrupt blood sugar levels, insulin as wellas protein in the body V 0,8 The body feels weak/ often sleepy Explanation: P1: Diabetes Type 1 P2: Diabetes Type 2 P3: Diabetes Gestasional P4: Diabetes Special Type

Design Process
There is flowchart program shown in the Figure 1.
b) Calculation of the likelihood A calculation of the probability value of each attribute against the class, the possibility of the emergence of a class when a attribute is selected, the calculation process for finding the likelihood as follow.

) The Result of Diagnosis
The user accepts the conclusion of a diagnosis was based illness carried out with the help of the value of certainty fectors.These result have been compared with testing data that is taken based on the diagnosis of the reality of the doctor on duty at RSUD Bendan, and produce accuracy equal to 100% for the testing data in use, so the result is valid to be receive as the conclusion of the diagnosis the user

Testing
After testing the 100 data medical records of patients of the disease diabetes in RSUD Bendan Pekalongan devided into devided into 2 that is 70 training data and 30 testing data then get the results by the accuracy of the 100% showed on Table 2. Based on the result of the data medical record used the system that has been made produce result 30 testing data accurate with the doctor's diagnosis.

CONCLUSION
Method of Naïve Bayes has 3 stages namely the research for prior, find the value of likehood, and looking probabilitasi end of posterior after obtaining the classification results of the calculation Naïve Bayes, the class that was selected from the classification process Naïve Bayes implemented in the calculation of Certainty Factor to find the value of certainty.After calculation Certainty Factor it will get the value of the certainty of the class selected on the calculation of the Naïve Bayes.After implementation 100 medical records data taken from RSUD Bendan Pekalongan, devided into 2 that is 70 training data and 30 testing data, it can the level of accuracyof the results of the diagnosis system is much as 100% accurate in accordance with the diagnosis the expert.

Figure 1 .
Figure 1.Flowchart program 3. RESULT AND DISCUSSION 3.1.Method The stages of the calculation data at the start of calculation Naïve Bayes then continue the calculation Certainty Factor. 1) Naïve Bayes Learning process model Naïve Bayes using70 semple data training medical records of diabetic patients from RSUD Bendan.In this process consist of several sub processes as follow: a) Calculation of the prior A process where compare the many members of a class with the overall Example: There are 10 patients disease diabetes type 1 on the data training so the process of calculation as follows.Prior = 10 70 = 0,142 of the posterior Based on the result calculation of likelihood in the form of probibalitas attribute to the class, calculated by means of controlling the possible attributes of the input with the class, in this process obtained the probability of the end for the conclusion the results of the classification

Table 1 .
The value of the weight symptoms

Table 2 .
Result of the testing data Amount of data testing