Upload
umerhasan
View
224
Download
1
Tags:
Embed Size (px)
DESCRIPTION
A Research Paper - Not meant to be published just to learn the proper format of a formal research
Citation preview
Effectiveness of Neural Networks in Diagnosing Acute Inflammations of
Urinary System
Research report submitted for partial fulfilment of Artificial Intelligence
Coursework
Submitted by
Muhammad Umer Hasan & Sameeduddin Qureshi
In Department of Computer Science
University of Karachi
Abstract
Artificial Neural Networks are used to solve a wide range of problems. This paper proposes an
expert system which, by using artificial neural networks, learns to recognize the patterns of
diseases and accurately makes diagnosis. The proposed system uses Neural Networks to learn the
patterns of both diseases and shows how accurate it could be in identifying diseases. The neural
networks were trained with data taken from ‘Acute Inflammations Dataset’ from UCI machine
learning repository. This data set is about symptoms and diagnosis of two diseases of urinary
system which are inflammation of urinary bladder and Nephritis of renal pelvis origin. We found
that the system was 100% accurate in diagnosing inflammation of urinary bladder and 80%
accurate in diagnosing nephritis of pelvic origin after training.
Introduction
Diagnosis is one of the most risky decisions a doctor has to take. And if the decision is wrong it
could be claimed and affects the reputation of the doctor. One wrong diagnosis can result in wrong
treatment of a patient which can have severe consequences, sometimes fatal. And the same
decision, if claimed, could result in a doctor’s ‘professional death sentence’. When reviewing 25
years U.S. medical malpractice claims the researchers of John Hopkins Medicine found that only
diagnostic errors accounted for the largest fraction of claims. Diagnosis related payments
amounted to $38.8 billion in 1986-2010. The number of patients found to be diagnosed wrong in
U.S. ranges from 80,000 to 160,000 injuries or deaths annually [1]. Another study says wrong
diagnosis results in 40,000 to 80,000 deaths in United States annually [2].
Doctors, after all, are humans and are liable to make errors. So does a computer. But a computer
is not drawn towards a particular idea and is totally unbiased.
In this paper we propose an expert system that uses Neural Networks that learns to diagnose two
of the most difficult to diagnose diseases, viz. Inflammation of Urinary Bladder and Nephritis of
pelvis origin.
Various authors have suggested using Artificial Neural Networks in diagnosing different diseases.
Das, Turkoglu and Sengur (2009) examined effectiveness of Artificial Neural Networks in
diagnosis of heart disease [3]. They found 89.01% classification accuracy using ensemble based
methodology. Amato, et al (2013) proposed Artificial Neural Networks based models for diagnosis
of various diseases and found that they were reliable at processing large data and did not overlook
relevant information and reduction in diagnosis time [4]. Al-Shayea (2011) proposed the use of
Artificial Neural Network in diagnosing acute nephritis disease and heart disease and found feed-
forward back propagation network was 99% accurate in the classification of nephritis and 95%
accurate in classification of heart disease [5]. Atkov (2012) studied different types of neural
networks and their accuracy in predicting coronary heart disease. They found the best accuracy
with two hidden layer model topology included by both genetic and non-genetic CHD risk factors [6]. Ganesan (2010) studied the application of neural networks to ease the work of clinician and
increase cost effectiveness. They found that neural networks can effectively diagnose lung cancer
by using demographic data [7].
After reviewing existing body of research present study was designed to investigate whether neural
networks could be used for diagnosing acute inflammations of urinary system or not. It is suggested
findings of this research helps in accurately diagnosing these diseases and reduce the chances of
error in diagnosis. The proposed system could be used by doctors and health professionals for
quick and accurate diagnosis.
In accordance with previous researches it is hypothesized that this system would be able to give
significantly accurate diagnosis of inflammation of urinary bladder and nephritis of pelvic origin.
Experimental Context
The data used for this research was taken from UCI’s machine learning repository [8]. The dataset
is named ‘Acute Inflammations’ and contains symptoms and diagnosis of two diseases, viz.
inflammation of urinary bladder and nephritis of pelvis origin. Table 1 shows the description of
dataset.
Table 1
Variables Attribute Names Representation in Dataset
X1 Temperature of Patient Numerical data, Ranges from 35-42°C
X2 Occurrence of Nausea Yes or No
X3 Lumbar Pain Yes or No
X4 Urine pushing (continuous
need for urination)
Yes or No
X5 Micturition Pains Yes or No
X6 Burning of Urethra, itching,
swelling, etc.
Yes or No
X7 Decision: Inflammation of
Urinary Bladder
Yes or No
X8 Decision: Nephritis of pelvic
origin
Yes or No
Methodology
Artificial Neural Networks
Artificial Neural Networks are information processing systems. They start from blank and learn
by adjusting weights after comparing their activation value with the real output. These networks
are composed of neurons. Each neuron can do a single task, and collectively they are called neural
network. Working of a single neuron is shown in figure 1 [9].
Figure 1
Inputs
They are the values which are given provided to the neural network to work upon. The inputs are
encoded so that they can be represented become useful for the network and out in the activation
function [10]. Table 2 shows the encoding of data used in this research.
A yes/no value can be encoded in 0 and 1, where 0 represents no and 1 represents yes.
A numerical can be divided or multiplied to help the activation function generate values
near to the threshold.
For a categorical data, such as religion or political interest, we have to add input neurons
one for every category.
Table 2
Input Values Encoded Value
1. Temperature 35.0 - 45.5 Divided by 100, so the input
is between 0.35 to 0.45
2. Occurrence of Nausea Yes or No 1 or 0
3. Lumbar Pain Yes or No 1 or 0
4. Urine pushing (continuous
need for urination)
Yes or No 1 or 0
5. Micturition Pains Yes or No 1 or 0
6. Burning of Urethra,
itching, swelling, etc.
Yes or No 1 or 0
7. Decision: Inflammation of
Urinary Bladder
Yes or No 1 or 0
8. Decision: Nephritis of
pelvic origin
Yes or No 1 or 0
Weights and Activation function
Every input is assigned a weight and the sum of the products of all the inputs with their weights is
called Activation function. Afterwards the value generated by activation function is checked
against a ‘Threshold value’. If the value exceeds the threshold value, the neuron is activated and
transfers the output to next layer. If not, the neuron is not considered activated.
𝑌 =∑ 𝑊𝑖 ∗ 𝑋𝑖𝑛
𝑖=1
Activation Function [11]
where,
wi = weight of the ith input
xi = ith Input
Backtracking
The real idea behind training neural networks is machine learning, i.e., learning from mistakes.
The neurons check their activation with respect to the output provided in training. If their output
is wrong they use a backtracking function to adjust their weights. This adjustment of weights is
called leaning or backtracking and its formula is given below.
Wi = Wi + (a * Xi * e) [12]
where,
Wi = weight of ith input
a = learning rate (in this research it was kept 0.2)
Xi = ith input
e = error (error = actual output value – calculated output)
Network Model
Figure 2
Sample Pseudo code for Neurons
Step 1. Set Y = 0, a = 0.2;
Step 2. Get weights from database
Step 3. Get the first instance of inputs from dataset
Step 4. for I = 1 to 6
Y = Y + Wi*Xi
Step 5. If Y > 0, Y = 1
Else Y = 0
Step 6. Error = Actual Value of Diagnosis (0 or 1) – Y
Step 7. For I = 1 to 6
Wi = Wi + (a * Xi * Error)
Step 8. Update the weights in database
Step 9. Repeat steps 1 through 8 until there is no error in a complete iteration over complete
dataset.
{For the complete code of the software system, see Appendix A}
Result
Neuron 1 and Neuron 2 were trained 4 times to finally diagnose inflammation of urinary bladder
and nephritis of pelvic origin. The initial value for all weights was set to 0.5. After training the
weights adjusted through backtracking. Graph 1 and Graph 2 show the final weights, after training,
used by the artificial neural network to diagnose both diseases. Graph 3 shows the number of errors
in each epoch (iteration) which, as we can see, there are none after training 4 times. These are the
final values and they don’t need to be changed for the training dataset.
Graph 1 – shows values of weights to successfully diagnose inflammation of urinary bladder
Graph 2 – shows values of weights to successfully diagnose nephritis of pelvic origin
Temperature
NauseaLumbar
PainUrine
PushingMicturition
Pains
Burning,itching,
swelling ofUrethra
Series1 -0.102 0.3 -0.9 0.5 0.3 0.1
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
Final weights to diagnose inflammation of urinary bladder
Temperature
NauseaLumbar
PainUrine
PushingMicturition
Pains
Burning,itching,
swelling ofUrethra
Series1 -0.1578 0.5 -0.1 0.1 0.3 0.1
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
Final weights to diagnose nephritis of pelvis origin
Graph 3 – shows the number of errors in each iterations (or number of weight adjustment),
which finally stops at the 4th iteration.
Finally the neural network was tested for new data which was especially kept for testing purposes
and was not included in training dataset. It revealed that the neural network can accurately diagnose
inflammation of urinary bladder to 100% and nephritis of pelvic origin to 80%. Furthermore it can
be seen that statistically both the percentage of correct diagnoses are significant.
Graph 4 – shows the accuracy (in percentage) of neural network for diagnosis
0
2
4
6
8
10
12
1 2 3 4
Errors in each iteration
N1 N2
0
20
40
60
80
100
120
Inflammation of urinary bladder Nephritis of pelvic origin
Testing - Accuracy of Neural Network in Diagnosis
Conclusion
The main objective of this paper was to validate the use of neural networks for diagnosing
inflammation of urinary bladder and nephritis of pelvic origin. This could be achieved with a
number of algorithms but use of neural networks was proposed because neural networks are
flexible and can perform a number of operations which cannot be achieved through linear
programming. They are fault tolerant and adaptive. They use learning algorithms so the more a
neural network is used, the more accurate it becomes.
The neural networks were trained until the weights were completely adjusted with respect to the
training data. Finally, new data was used for testing purpose and it revealed that the proposed
system diagnosed inflammation of urinary bladder 100% accurately and diagnosed nephritis of
pelvic origin with 80% accuracy.
The accuracy could be enhanced and will be increased with more training data. The training dataset
of ‘Acute Inflammations’ downloaded from UCI’s machine learning repository only consisted of
120 instances from which some repeated data was eliminated and testing data was also excluded.
So it amounted 70 instances for dataset and 20 instances for testing. If the more training data is
provided or the system is used in a hospital for some time, its accuracy will become more
significant. However, from results it can be concluded that neural networks can be used to
efficiently diagnose inflammation of urinary bladder and nephritis of pelvic origin.
References
1. Toker, D. E. N. (2013). Diagnostic errors more common, costly and harmful than
treatment mistakes.
Retrieved from
http://www.hopkinsmedicine.org/news/media/releases/diagnostic_errors_more_common_
costly_and_harmful_than_treatment_mistakes
2. O’Rielly, K. B (2010). Diagnostic errors, why they happen.
Retrieved from http://www.amednews.com/article/20101206/profession/312069947/4/
3. Das, R; Terkoglu, I. & Sengur, A. (2009). Effective diagnosis of heart disease through
neural networks ensembles. Expert Systems with Applications: An International Journal,
36 (4), 7675-7680.
4. Amato, F; Lopez, A; Pena-Mendez, E. M; Vanhara, P; Hampl, A & Havel J. (2013).
Artificial neural networks in medical diagnosis. Journal of Applied Biomedicine, 11, 47-
58.
5. Al-Shayea, Q. K. (2011). Artificial Neural Networks in Medical Diagnosis. International
Journal of Computer Science Issues, 8 (2), 150-154.
6. Atkov, O. Y; Gorokhova, S. G; Sboev, A. G; Generozov, E. V; Muraseyeva, E. V;
Moroshkina, S. Y. & Cherniy, N. N. (2012). Coronary heart disease diagnosis by
artificial neural networks including genetic polymorphisms and clinical parameters.
Journal of Cardiology, 59 (2), 190-194.
7. Ganesan, N; Venkatesh, K; Rama, M. A. & Palani, A. M. (2010). Application of neural
networks in diagnosing cancer disease using demographic data. International Journal of
Computer Applications, 1 (26), 0975-8887.
8. https://archive.ics.uci.edu/ml/datasets/Acute+Inflammations
9. http://ulcar.uml.edu/~iag/CS/A-Neuron.gif
10. http://visualstudiomagazine.com/articles/2013/07/01/neural-network-data-normalization-
and-encoding.aspx
11. Russell, S. & Norvig, P. (2003). Artificial Intelligence: A Modern Approach (2nd ed.) pp.
740. Pearson Education, Inc., New Jersey.
12. Coppin, B. (2004). Artificial Intelligence Illuminated (1st ed.) pp. 297. Jones and Bartlett
Publishers, Inc., Sudbury Massachusetts.