Comparative Analysis of Cow Disease Diagnosis Expert System using Bayesian Network and Dempster-Shafer Method

Livestock is a source of animal protein that contains essential acids that improve human intelligence and health. Popular livestock in Indonesia is cow. Consumption of meat per capita is increased by 0.1% kg / capita / year. The high demand for beef in Indonesia is due to the increasing of population in Indonesia by 1.49% per year. More than 90% of cows are reared by rural communities with less of knowledge about livestock and have low economic capabilities. In addition, the number of experts or veterinarians are also limited. One of the solutions that can be done to socialize the knowledge of experts or veterinarians is by using expert system. Some methods that can be used in expert systems are Bayesian network and Dempster-Shafer method. The purpose of this research is to analyze the comparison of cow disease diagnosis with bayesian network and Dempster-Shafer method. In order to know which method is better in diagnosing cow disease. The data used is 21 cow diseases with 77 symptoms. Each method is tested with the same 10 cases. The conclusions obtained by Bayesian network and Dempster-Shafer method. Both of methods give the same diagnosis results but with different percentage. The mean value of diagnosis percentage by Dempster-Shafer method is 87,2% while bayesian network method is 75,3%. Thus, it can be said that the Dempster-Shafer method is better at diagnosing cow disease. Keywords—Expert system; Bayesian network; DempsterShafer; cow disease


I. INTRODUCTION
Livestock is a source of animal protein containing essential amino acids that can help improve the degree of intelligence and human health.Also, Livestock have a high selling price.There are many animals that can be used in livestock, such as cows, goats, rabbits and poultry.The quite popular livestock in Indonesia is cow.Because not only beef, but also skin, milk, and cow dung are beneficial to humans.
The high demand for beef in Indonesia is due to the increasing population of Indonesia at 1.49% per year and the consumption of meat per capita increased by 0.1% kg / capita / year.The rate of increase in cow population can not keep pace with population growth and consumption needs [1].This forced Indonesia to import, both in the form of live cow and meat and offal of cow.
One of the obstacles that can be faced by breeders is cow disease.Disease attacks can disrupt the growth of livestock that will impact on livestock yields [2].Over 90% of cow are reared by rural communities with little knowledge of livestock and relatively low economic capabilities [1].Breeders usually do not examine the diseases that attack livestock thoroughly and handle drug using only by estimates and habits [3].The process of diagnosing a disease needs an expert experience to get the right conclusions [4].But, the expert is limited.This is a serious problem for breeders, if they want to cultivate good quality livestock.A solution is needed for these problems.
The One way that can be done to popularize the knowledge of experts or veterinarians is by using an expert system [5].Expert systems are computer-based applications that adopt knowledge, facts and reasoning techniques obtained from experts in order to solve existing problems [6].Some methods that can be used in expert systems are the Bayesian network method and the Dempster-Shafer method.
Bayesian Network is a method that shows the probability of relationships between related and unrelated events.The Bayesian network method is built from probabilistic theory and graph theory [7].Whereas, Dempster-Shafer is a mathematical theory for proof based on belief function and plausible reasoning that is a function of trust and reasonable thinking to combine separate pieces of information or evidence and calculate the likelihood of an event [8].In expert system development, the Bayesian network and Dempster-Shafer methods are used to calculate the value or percentage of the probability of an event based on the available evidence.
Bayesian network method has been implemented in webbased expert system for diagnosing cow disease.There are 3 diseases that can be diagnosed based on 11 symptoms [9].Then in 2018 the Dempster-Shafer method is implemented in web-based expert system for diagnosing cow disease with 21 diseases can be diagnosed based on 77 symptoms [10].
In this research, will be built an android-based expert system to diagnose cow disease using Bayesian network method with 21 diseases can be diagnosed based on 77 symptoms.The authors compare cow disease diagnosis expert system using Bayesian Network and Dempster-Shafer method to know which method is better in diagnosing cow disease.

A. Expert System
Expert systems are computer-based applications that adopt knowledge, facts, and reasoning techniques obtained from www.ijacsa.thesai.orgexperts to solve existing problems [6].In the expert system there is a Knowledge Based and an inference engine.Knowledge Based is a collection of knowledge, facts and rules obtained from experts.Whereas, the inference engine is a method of knowledge-based approach, to study and solve problems.So that, conclusions can be drawn based on the data that has been collected [11].The basic concept of the expert system is shown in Fig. 1, that the user can submit facts to the expert system that consist of knowledge base and inference engine.Facts obtained from users will be matched with knowledge base.After that, the inference engine will give a response to the user in the form of a decision or conclusion [12].
The expert system consists of two parts: the development environment which is used to incorporate knowledge into the expert system and the consultation environment which is used by the user to gain expert knowledge [12].The structure and components of the expert system are shown in Fig. 2 [13] in [4].
The characteristic of expert system are have a reliable information facility, easy to modify, can be used in various types of computers, have the ability to learn to adapt [13] in [4].
The main objective of expert development is to distribute expert's knowledge and experience into computer systems [14].Expert systems are applied to support various issues.The function of the expert system is as a clever assistant who can represent the expertise of experts in solving problems [15].So, it is expected to increase productivity and ease of access to expert knowledge.

B. Bayes Theorem
The approach used in bayesian networks is the Bayes theorem which is an approach to uncertainty measured by probability.Bayes theorem is a conditional probability denoted by P (H | E) as for Bayes's theorem formula [6]

C. Bayesian Network
Bayesian networks is method that used to connect interrelated and unrelated events or variables.The Bayesian network method is built from probabilistic theory and graph theory.There are two main parts of the bayesian network namely the graph structure and set parameters.Structural time represent qualitatively knowledge or data.Graph structure is called Directed Acyclic Graph (DAG) which consists of nodes and edges.Nodes is used to represent random variable and edge is used to represent caused-effect relationships between connected variables.Whereas, the set parameter is the number of prior probabily or the degree of trust of each variable.The set of parameters to represent knowledge quantitatively [7] in [16].An example of a DAG is shown in Fig. 3 [17].2) Determine parameters: Parameter value is the prior probability value given by the expert based on the likelihood of the occurrence of the disease based on the symptoms that appear. 3

) Making Conditional Probability Table (CPT):
CPT is probability of an event B if it is known that event A has occurred.So, it is denoted by P (B | A).CPT is also an opportunity form of various symptoms and forms in the form of tables with positive and negative values.Example of CPT is shown in Table I. www.ijacsa.thesai.orgThe following is an explanation of each possibility of CPT:  Positive symptoms and positive disease, for example cow fever and anthrax.This value is called the present value.
 Negative symptoms and positive disease, meaning not cow fever but anthrax.This value is called the present2 value.
 Positive symptoms and negative disease, meaning cow fever but not anthrax.This value is called the absent value.
 Negative symptoms and negative illness, meaning that the cow does not have fever and is not affected by anthrax.This value is called the absent2 value.

4) Making Join Probability Distribution (JPD):
JPD is the value of the chance of occurrence that occurs simultaneously for all combinations of values contained in each of the symptoms caused.JPD can be calculated by multiplying the CPT value by the prior value.So the equation is: JPD present is the result of the multiplication between the present value and the prior value.And, JPD absent is the result of multiplying the absent values with the prior value.

5) Calculate posterior probability: Posterior Value
Probability is used to calculate the probability value of a symptom occurrence.Posterior values are calculated using the JPD value previously obtained.The form of the equation is: 6) Probability inference: Probability inference is to calculate the posterior probability value of each symptom that is adjusted to the bayesian network structure and the inference method.The result value from probability inference is the value used to indicate the percentage of possible diseases that attack cow.The form of the equation is: Where n is the number of symptoms and n Symptoms 0 [14] in [16].

D. Dempster-Shafer
Dempster-Shafer is introduced for the first time by Arthur P. Dempster and in 1976 Glenn Shafer published the Dempster theory in a book entitled Mathematical Theory Of Evident.Dempster-Shafer is a mathematical theory for proof based on belief function and plausible reasoning, which is a function of trust and thought that makes sense, to combine separate pieces of information or evidence, to calculate the probability of an event [8].The rules used to overcome a number of evidence or evidence are known as Dempster's Rule of Combination.The form of the equation is: where
 Skin, consisting of 16 symptoms, which are dry, thick, hard scab or scab (scab) with irregular edges and itching (G039), skin abnormalities occur on the face and neck (G040), broken hair or fall out (G041) , visible thick, round, protruding lesions with clear boundaries, grayish white color (G042), hair standing and looking dull (G043), thin and yellowing skin (G044), baldness in the skin (G045), reddish skin (G046), crusty skin (G047), skin feels more oily (G048), skin abnormalities in the nose and mouth snout, around the eyes, ears, lower body, base of the tail, neck along the back and legs (G049), animals always cuddle and rub against other objects or biting the itchy body parts (G050), sores on the skin covered by scab and looks thick (G051), skin blisters in the form of small blisters then become large wounds (G052), these wounds are often found in the upper part of the neck, area hump, waving, shoulder, seki tar eyes and feet (G053) and hives (G054).
 Swelling, consisting of 8 symptoms, namely swelling in the neck, chest, side of the stomach, waist and external genitals (G067), swelling in the muscles of the shoulder and thighs (G068), swollen or enlarged lymph nodes (G069) , in the swollen part it feels soft, contains fluid, heat and sounds crackling (G070), swelling is seen on the head, lower chest and legs or base of the tail (G071), swollen lymph glands (G072), stomach enlargement and pain ( G073), and swelling between the angle of the chin and lower abdomen (G074).
 Fertility, consisting of 3 symptoms: miscarriage up to 3 times at 5-8 months of gestation (G075), fetal fluid that comes out during a murky miscarriage (G076) and temporary or permanent infertility (G077).4 illustrates that the actor that is user has five activities that can be done, such as accessing the language menu, diagnosing the disease and seeing the results of the diagnosis, viewing the disease list information, accessing the menu and the instructions menu.

B. Diagnosis and Calculation of Bayesian Network Method
The first diagnosis and calculation is using the Bayesian network method.The following is an example of the calculation.
Known, a cow experiences the following Symptoms:  Having stiffness around the infection (G012) Based on these symptoms, it is known that diseases that might attack cattle are Tetanus, Surra and Myasis.The calculation process is as follows: 1) Disease 1: Disease 1 is Tetanus.From the symptoms that are known, the three namely G012, G014, and G025 are symptoms of Tetanus.Following are the values of each Symptoms: Table III is a list of prior Symptoms of cow disease.After the prior value is determined, then making CPT as shown in Table IV.
Table IV is a list of present and absent scores for each Symptoms for Tetanus.The present2 value is obtained from the result of a reduction of 1 with the present value.And the absent2 value is obtained from the results of a reduction of 1 with an absent value.After making CPT, then make JPD as shown in Table V. x So, the possibility of a cow being affected by Tetanus based on the Symptoms of Having stiffness around the infection, Experience spasms, and Restless is 72.62%.
2) Disease 2: Disease 2 is Surra's disease.From the symptoms that are known, two of them include Symptoms of Surra disease, G012 and G014.The following is the calculation process:

Symptoms Tetanus
Positive Negative   The following are probability inferences for Surra Disease:

Having stiffness around the infection
So, it's possible that a cow with Disease Surra based on Symptoms of Having Stiffness around the infection and Experience spasms is 71.36%.
3) Disease 3: Disease 3 is Disease Myasis.From the symptoms that are known to include one of the symptoms of myasis disease, G025.The following is the calculation process: Table X  Here is the probability inference for Disease Myasis: So, the possibility of a cow with Disease Myasis based on Restless cows is 64.29%.So, if the known symptoms are having stiffness around the infection, experience spasms, and restless then the results will be displayed by the expert system with the Bayesian network method, sequentially from the possibility of a high disease is Tetanus with a probability of 72.62%, Surra 71, 36%, and Myasis 64.29%.The percentage value is influenced by the prior value and the present value of each Symptoms.

C. Diagnosis and Calculation of the Dempster-Shafer Method
The first diagnosis and calculation is using the Dempster-Shafer method.The following is given an example of the calculation.It is known, a cow experiences the following Symptoms:  Having stiffness around the infection (G012) 1) Symptoms 1: Having stiffness around the infection is a symptom of Disease Tetanus (P011) and Disease Surra (P021).With the value "basic probability assignment" (bpa) that is 0.4.Then: 2) Symptoms 2: Experience spasms are Symptoms of Disease Tetanus (P011) and Disease Surra (P021) with a value (bpa) of 0.5.Then: With these new Symptoms (m2), a new bpa value for several combinations (m3) is calculated.M3 combination rules can be seen in Table XIII.
Then the combination between m1 and m2 is calculated as follows: 3) Symptoms 3: Restless is a Symptoms of Disease Tetanus (P011) and Surra (P020) with bpa which is 0.6 then: With these new Symptoms (m4), new bpa values for several combinations (m5) are calculated.The combination rule m5 can be seen in Table XIV.
Then the combination between m3 and m4 is calculated as follows:   The final result can be seen in Table XV.The highest bpa value is m5 {P011} which is 0.42 which means the highest probability of Disease with Symptoms Having stiffness around the infection, Experience spasms, and Restless is Tetanus (P011).So, the percentage value is affected by many symptoms that intersect between other diseases.

IV. TESTING AND RESULTS
Expert system for diagnosing cow disease with the Bayesian network method built on Android.Whereas, the expert system of diagnosing cow disease with the Dempster-Shafer method was built based on the web.The application of cow expert system with bayesian network method is shown in Fig. 5 and 6.
And, the application of cow expert system with the Dempster-Shafer method is shown in Fig. 7 and 8. Tests were carried out to compare the diagnosis results of expert systems using the Bayesian network method with the results of expert system diagnostics using the Dempster-Shafer method.Each method will be tested with the same 10 cases.Comparison of diagnostic results is shown in Table XVI.The percentage interval in this study is 20%.Results are:

B. Dempster-Shafer Method
The highest percentage value is 99.93% (Anthrax) and the lowest percentage value is 42% (Tetanus).The average percentage of diagnoses obtained was 87.2%.At intervals of 40% -59.99% there are 2 diseases, namely, Tetanus (42%) and Salmonellosis (59.96%).And at intervals of 80% -100% there are 8 diseases.Tetanus and Salmonellosis have the lowest percentage because all the symptoms of the disease intersect with other diseases.

V. CONCLUSION
Based on the results of the study, it can be concluded that Bayesian network method and Dempster-Shafer method can be implemented into expert systems.The number of diseases and symptoms that can be diagnosed is more than in previous research, from 3 diseases based on 11 symptoms to 7 diseases based on 77 symptoms.The Bayesian network and Dempster-Shafer methods provide the same disease diagnosis results but with different percentages.The average percentage of diagnosis results with Dempster-Shafer (87.2%) was higher than the percentage of diagnoses with bayesian network (75.3%).So, it can be said that the Dempster-Shafer method is better than the bayesian network method.Based on the 10 cases tested, the results of diagnosis of 8 diseases are higher compared to the percentage value using bayesian network.And 2 other diseases with Dempster-Shafer are smaller than the percentage value with the Bayesian network.The percentage value with bayesian network is influenced by the prior value and the present value of each symptom.Meanwhile, the percentage value with Dempster-Shafer is influenced by the number of symptoms that intersect between other diseases.

Fig. 3
Fig. 3 is an overview of the bayesian network structure consisting of nodes (N) = {A, B, C} and edge (E) = {(B, A), (B, C)}.Nodes A and C are children that are given a condition.Whereas, node B is the parent that is used as a condition.Steps for implementing the bayesian network are: 1) Building bayesian network stucture: The bayesian network structure consists of symptom and cow disease data which is represented by graph structure.2) Determine parameters: Parameter value is the prior probability value given by the expert based on the likelihood of the occurrence of the disease based on the symptoms that appear.3)Making Conditional Probability Table (CPT):CPT is probability of an event B if it is known that event A has occurred.So, it is denoted by P (B | A).CPT is also an opportunity form of various symptoms and forms in the form of tables with positive and negative values.Example of CPT is shown in TableI.

P
Case Diagram Use case diagram is used to interpret the user interface functions.Use case diagram of expert system diagnosis of cow disease consists of 6 activities shown in Fig. 4.

Fig. 5
Fig. 5 and 7 are pages that list the symptoms of cow disease which can be chosen by checking or symptomatic symptoms.Whereas, Fig 6 is a diagnostic result page with bayesian network (BN) method and Fig. 8 is a diagnosis result page using the Dempster-Shafer (DS) method.

Fig. 8 .
Fig. 8. DS Diagnosis Result Page.To analyze the percentage of the test results is used the percentage of disease interval obtained from the following equation:(12)(13)

Table
VII is a list of CPT values for Surra disease.Table VIII is a list of values for JPD Surra and Table IX is a list of Posterior Value Symptoms of Surra.

TABLE III .
LIST OF PRIOR SYMPTOMS

TABLE VI .
LIST OF POSTERIOR SYMPTOMS DISEASE 1

TABLE VII .
LIST OF CPT DISEASE 2 is a list of CPT Disease Myasis values.Table XI is a list of JPD Disease Myasis and values.Table XII is a list of Myasis Posterior Value Symptoms Disease.

TABLE IX .
LIST OF POSTERIOR SYMPTOMS DISEASE 2

TABLE XII .
LIST OF POSTERIOR SYMPTOMS DISEASE 3

TABLE XIII .
COMBINATION OF SYMPTOMS 1 AND SYMPTOMS 2

TABLE XIV .
COMBINATION OF SYMPTOMS 1, SYMPTOMS 2 AND

TABLE XV .
FINAL RESULT Table of frequency of diseases is shown in Table XVII.

TABLE XVI .
COMPARISON OF DIAGNOSIS RESULTS