You are on page 1of 10

International Journal of Computer Science and

Engineering Information Technology Research


(IJCSEITR)
ISSN (P): 2249–6831; ISSN (E): 2249–7943
Vol. 11, Issue 1, Jun 2021, 1-10
© TJPRC Pvt. Ltd.

KNOWLEDGE BASED EXPERT SYSTEM FOR MEDICAL DISEASE DIAGNOSIS

DIKSIKUMARI SUTHAR
Dept. of CE, BVM Engineering College, Anand, Gujarat, India
ABSTRACT

In the domain of Medicine, prediction of various diseases in earlier stage is very much important nowadays. As we all
aware about that most of the villages have lesser hospitals in their areas so, to provide a good medical prescription
becomes very difficult. Due to some environmental condition like smoking and drinking, people suffer from many health
related issues. We can also observe a huge and long queue in all nearby hospitals. Recently, most common diseases, for
example lung cancer, pneumonia, bronchitis (acute inflammation of the bronchial tubes), breast cancer etc. are
gradually increasing and causing serious health issues to the people. Also smoking, bad immune system and all these
common causes which can be risk factors of various diseases also play big role in causing these diseases. All the
developing countries facing this issue now plan how a good hospital and medical services can be provided to their
country people with minimum time and cost. And by avoiding long queue of patients from hospitals. This paper describes
our work towards a model of Medical Expert Diagnosis System Which uses Bayesian network for probabilistic reasoning

Original Article
and also used artificial neural network to predict various disease. Hence, we presented progress of our work in disease
diagnosis via two different methods.

KEYWORDS: Bayesian networks, Medical diagnosis, Disease & Artificial neural networks

Received: Dec 28, 2020; Accepted: Jan 18, 2021; Published: Feb 04, 2021; Paper Id.: IJCSEITRJUN20211

INTRODUCTION

A knowledge based expert system, this name frequently comes under the umbrella of artificial intelligence. Where it
mostly used in the domain of medical to automobile to natural language processing and in many more. Here, we
presented our work about how Expert System becomes useful by the people who cannot reach up to the hospital
from their areas. So this expert system can be useful to all the patients affected by this disease to get immediate
solution to their problem avoiding going to the hospital and sitting in long queue. This system can provide some
prescription and suggestions as a Doctor as well. Moreover, our country contains most of the rural areas where we
have limitation of medical services and do not have any good medical experts. Bayesian networks (BN) is most
frequently used tool for medical diagnostics and can be deployed in real medical environments, in medical Domain,
to Construct Complex and large BNs is in many ways similar to the knowledge-engineering process employed in the
creation of expert systems (ES). In addition to BN, Neural network is also used for prediction of any disease based
on its symptoms.

www.tjprc.org editor@tjprc.org
2 Diksikumari Suthar

Figure 1: Structure of an Expert System

Although, creating a BN is generally more difficult than building an Expert System, because a BN will have So
much of data about diseases, risk factors and symptoms. Where directed acyclic network will be used. Otherwise reasoning
will become very difficult.

The statistics for filling in this numeric information are not readily available every time and often the developer of
the system has to make use of indirect statistics instead. Like, always it is not clearly known how combinations of diseases
will fetch the outcome of a particular diagnostic test what is usually available are only the positive and negative predictive

likelihoods of that test for various disease, regardless of what other diseases might be present [1].

OBJECTIVE

The important objectives of the proposed Diagnosing Expert Systems are as follows:

 To provide user friendly and intelligent tool for reasoning in any domain for diagnosing purpose.

 To make correct, precise and accurate tool.

 To provide medical expertise in Villages.

 To assist doctors for various diseases associated with symptoms i.e. to be a home assistant for doctors.

 To make faster and accurate ES for complex network.

 To help medical officers, intern doctors, nurses, medical students to diagnose the patients.

 To reduce workload of expert doctors and store huge detail of diagnosing.

In medical diagnosis domain, number of variables that learn and then variation in the decision process thereby
causing the variations in the review of the practitioners. There are also various uncertain risk factors play role in medical
expert system, so sometimes disease diagnosis is critical and complex for intelligent in that respective domain. Huge number
of factors is required to analyze and to diagnose the disease as well as different symptoms which a patients have makes the
doctor’s job difficult. There for we need an accurate tool that will be great help for an expert which can consider all these

Impact Factor (JCC):10.4593 NAAS Rating: 3.76


Knowledge Based Expert System for Medical Disease Diagnosis 3

causes as risk factors, perform reasoning over them and show results with certainty in uncertain terms or in probabilistic
terms.

METHODOLOGY

An expert system (ES) is a knowledge-based system which performs reasoning procedure to search a solution to any
question of questioner, it also has large number of information in terms of knowledge about its application domain and an
inference engine is used to perform complex task of analysis that would otherwise need an expert of certain field of domain.
The Strongest part of expert system is the specific information about a narrow domain saved in the expert system's
knowledge base. Inference engine will perform all complex computation.

Bayesian network is a binary group, named as S=<G,P>,where: (1)G is a directed acyclic graph. The nodes

correspond to random variable and the directed arcs represent probabilistic dependence between variables. The meaning of

the arc from x to y is that x have direct influence to y. (2)P is the set of local probability distribution , x P=P{P(x|Pi )} is

conditional probability, which measure the strength of causal dependencies and x. Pi is the set of parent nodes of x[4] .

Fig.1.1: Two Layered Structure of Disease and Symptoms Example

The Developing of Bayesian Network Tool

We can easily use our own Bayesian tool rather than using inbuilt tool like bayesnet in java , MATLAB, This tool can be
used to any domain not only just restricted to medical domain for diagnosing purpose. For e.g., To find a flaws in cars in
automobile domain. This tool includes two components. One is the Bayesian building component, the second one is
reasoning via this tool. Through the building component, tree kind of structure can be constructed and assign some cpt
values to each and every component of Bayesian tree model, knowledge base need to be stored in xml file which can be
imported any time in our system when we want to update knowledge of our expert system. Through the reasoning
component, the posterior probability of a node can be computed. Only prior probability of parents node will not be
calculated but those cpts will be decided by experts. All children node’s probability (posterior probability) depends on prior
probability.

RESULT ANALYSIS

www.tjprc.org editor@tjprc.org
4 Diksikumari Suthar

The user / operator, while using Expert System in actual practice, is expected to provide the question to the expert system
and system answers from its knowledge base according to the question is asked. Usually, system will ask about symptom
that patient may have. User will answer either in yes or no Then our intelligent system will analyze that patient may be
suffering from which disease and with how much of probability.

We can generate network from dataset available to us. We have risk factors like bad immune system smoking at
first layer, second layer contains diseases like pneumonia, lung cancer, bronchitis, common cold then at last and third layer
will have symptoms related to disease like fever, cough, chest pain, dyspnoea and runny nose.

The main task of constructing an expert system is based on its knowledge base. Here, knowledge base is composed of tree
structure. Our system will learn this tree structure and perform inferencing for diagnosing. Figure 2 shows Bayesian
network of diagnostic model. Where, nodes in first layer are risk factors .they conditionally dependent on nodes in the
second layer called diseases nodes and nodes in last or third layer are called symptoms. A network must be directed acyclic
graph. Because if network will be cyclic than inferencing will become very much difficult, time consuming and complex.
Hence if the network is cyclic then we have to perform splitting over them and divide into small network for analysis.

Figure 1.2: A Tree structure of Diagnostic Model

An Inferencing tool based on our model

A Bayesian tool needs to be generated for probabilistic reasoning which follows following steps

 Create the network based on inputs received from user.

 Nodes(features)

 Links(causal relations among features)

 Values of CPTs.(system will ask each value)

 Will be able to produce probabilistic inferences

Impact Factor (JCC):10.4593 NAAS Rating: 3.76


Knowledge Based Expert System for Medical Disease Diagnosis 5

 Involving computations in the given Bayesian network

3 patterns are involved.

• Causal(top down)

E.g.: probability (symptom/disease)

• Diagnostic(bottom-up)

E.g.: probability (disease/symptom)

• Other

E.g.: probability (Dx/s,Dy)

It is a Generic tool, which can be applied in any domain. Using given CPT values we can find any other
probability. For e.g.: Such that if we have prior probabilities than we can find post probabilities of lower layer nodes. Only
probability of parent node is not mathematically generated but need to derive from medical experts.

Inferencing Results

Suppose in the first case the patient has been diagnosed with only bronchitis and after some questionnaires by intelligent
system we received positive results for his/her chest pain then We update the previous state of the network (|Chestpain| =
|true|) with the new evidence (|Bronchitis| = |true|) as shown in Table 4.1.Also from figure 4.2 we can compare the three
situations by plotting the probabilities as bar charts. Evidence of bronchitis and evidence of chest pain increase the
probability of lung cancer and smoking history, one indirectly and the other directly.

Table 1.0: Output of Probability Table


P(smoking/bronchitis=true) 0.55556
P(lung cancer/bronchitis=true) 0.16889
P(chest pain/bronchitis=true) 0.11796
P(bronchitis/bronchitis=true) 1
P(smoking/chest pain=true) 0.67927
P(lung cancer/chest pain=true) 0.67227
P(chest pain/chest pain=true) 1
P(bronchitis/chest pain=true) 0.18585
P(smoking/chest pain=true, bronchitis=true) 0.91372
P(chest pain/chest pain=true, bronchitis=true) 1
P(lung cancer/chest pain=true, bronchitis=true) 0.85908
P(bronchitis/chest pain=true, bronchitis=true) 1
P(smoking/chest pain=true, bronchitis=false) 0.62575
P(lung cancer/chest pain=true, bronchitis=false) 0.62962
P(chest pain/chest pain=true, bronchitis=false) 1
P(bronchitis/chest pain=true, bronchitis=false) 0

User Interface

Initially patient or doctor will login. If doctor wants to add some symptoms or change cpt values then they can login to
system and if patient wants to know that they are suffering from which disease then they can login into system easily. Here
we used java applet for user interface.

www.tjprc.org editor@tjprc.org
6 Diksikumari Suthar

Figure 1.3: Login Page

Figure 1.4: Disease-symptom Page After Patient Login

Impact Factor (JCC):10.4593 NAAS Rating: 3.76


Knowledge Based Expert System for Medical Disease Diagnosis 7

Figure 1.5: Prescription by an Expert System

Results using ANN Algorithm

Another way of diagnosing disease is using artificial neural network. Initially requirement of data collection and
classification need to be accomplished. It is based on the activation function used. The activation function used is sigmoid

F(x) = 1/1+exp(-σx)

Where Σx Is Input Of Hidden Layer.

We have used initially 30 hidden layer neurons,30 input layer neurons and 2 output neurons been generated. After
training a network among around 5000 rows, 70% of the data was used for training data and 30% for testing. We got
Accuracy =91% for 50 maximum iteration and 30 hidden layer neurons with lambda value 1.We can find change in
accuracy by changing number of iterations .lambda value and number of hidden neurons. Also we define terminating
condition to stop the training, rather than using static iteration. So, whenever cost will be minimized training will be stop
there. Terminating condition was decided from plot of error vs. iteration as depicted in Fig.1.7. Figure predicts that as
iteration increases gradually accuracy also increases. We can find best accuracy having 30 hidden neurons at 800 iteration,
which is 95.5% and lowest accuracy 92% at 50 iteration .Also Figure 10 shows that as we are increasing hidden neuron
there is some change in accuracy .We got highest accuracy 93.5 at 20 hidden neurons.

www.tjprc.org editor@tjprc.org
8 Diksikumari Suthar

Figure 1.6:.Hidden Neurons vs. Accuracy Plot

Figure 1.7: Error vs. Iteration Graph

CONCLUSIONS

We presented our research work in current techniques for diagnosing fault and disease in any field including medical that
may help researchers when choosing a given method. Certainly, probabilistic reasoning and condition based techniques
have been used over the last decade and deal with uncertain knowledge in disease diagnosis also. From our research work
we observed that Bayesian method give better accuracy compared to neural network method. However, there still are issues
to be solved such as developing better network for complex structure, to analyze directed cyclic graph and build flow less ES
with higher accuracy. Moreover, in case of artificial neural network method should give better result in case of more

Impact Factor (JCC):10.4593 NAAS Rating: 3.76


Knowledge Based Expert System for Medical Disease Diagnosis 9

number of features.

REFERENCES

1. Gufran Ahmad Ansari “An Adoptive Medical Diagnosis System Using Expert System with Applications” Journal of Emerging
Trends in Computing and Information Sciences, 2013

2. Adriana Albu, Loredana Stanciu “Benefits of Using Artificial Intelligence in Medical Predictions” The 5th IEEE International
Conference on E-Health and Bioengineering, 2015

3. Saidunnisa, Begum, Shariff Atiqulla, and Ghufran Ayman. "Prevalence of Polycystic Ovarian Syndrome among Students of
RAK Medical and Health Sciences University United Arab Emirates." International Journal of Medicine and Pharmaceutical
Science (IJMPS) 6.1, Feb 2016, 109 118.

4. Cameron E. Freer, Daniel M. Roy, And Joshua B. Tenenbaum “Towards Common-Sense Reasoning Via Conditional
Simulation: Legacies Of Turing In Artificial Intelligence” ,

5. Turing's Legacy: Developments from Turing's Ideas in Logic, ed. Rod Downey, ASL Lecture Notes in Logic 42, Cambridge
University Press, 2014

6. Helong Yu , Guifen Chen, “A Simplified Bayesian Network Model Applied In Crop Or Animal Disease Diagnosis” IEEE 15th
International Symposium on Biomedical Imaging ,774-778 , 2018

7. V. A. Kulkarni “Expert System For Fault Diagnosis” National Power Systems Conference, Npsc , 2002

8. Ovidiu Banias Adriana Albu “Bayesian Network Model for Diagnosis of Psychiatric Diseases” source: IEEE Xplore
Conference Paper, July 2009

9. Agnieszka Onisko, Marek J. Druzdzel, and Hanna Wasyluk “A Bayesian Network Model for Diagnosis of Liver Disorders”
Research Report CBMI-99-27, Center for Biomedical

10. Informatics, University of Pittsburgh, September 1999

11. Nayyar, Zainb. "Blood cell detection and counting." Int. J. Applied Engineering Research and Development (IJAERD) ISSN
(P): 2250-1584; ISSN (E): 2278 9383: 35-40.

12. Charles E. Kahn Jr, Linda M. Roberts’, Katherine A. Shaffer and Peter Haddaw “Construction of A Bayesian Network for
Mammographic Diagnosis of Breast Cancer” Compur. Biol. Med. Va. 21, No. 1. Pp. 19-29, 1997

13. Saied, H., Tetiana Utytskykh, and Oleg Avrunin. "Vital diagnostic method for cows’ gonads using ultrasound data and
discriminant analysis." International Journal of General Medicine and Pharmacy 3.2 (2014): 2319.

14. Dakshata Panchal and Seema Shah, Artificial Intelligence Based Expert System For Hepatitis B Diagnosis, International
Journal of Modeling and Optimization, Vol. 1, No. 4, October 2011

15. Bajwa, Mohammad. "Nanomedicine–The Futuristic Medicine." International Journal of General Medicine and Pharmacy
(IJGMP) ISSN (P) (2016): 2319-3999.

16. Ankita R. Mokashi, Madhuri N. Tambe, Pooja T. Walke, Review on Heart Disease Prediction using Ann and Classifier ,
International Journal of Engineering Research & Technology (IJERT) ISSN: 2278-0181 Vol. 4 Issue 09, September-2011

www.tjprc.org editor@tjprc.org

You might also like