You are on page 1of 14

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers
Bekir KARLIK Department of Computer Engineering, Mevlana University, Konya, Turkey bkarlik@mevlana.edu.tr Abstract: This study presents a comparison between Backpropagation and Naive Bayes Classifiers to diagnose hepatitis disease. Hepatitis is the general term for inflammation of the liver. The most common causes of hepatitis are the hepatotropic viruses (such as hepatitis A, B, and C) and alcohol abuse. In practice, both of these methods often compete well with more sophisticated classifiers. The performances of proposed methods are selected for each of classification tasks of hepatitis diseases. The overall accuracy of diagnosis systems were 98% and 97% respectively. Keywords: Hepatitis, diagnosis, Neural networks, Backpropagation, Naive Bayes, classifier 1. Introduction During the last decades, the utilization of Artificial Intelligence in medical applications has been recognized extensively. Artificial Intelligence in medicine comprises of interpretation of medical images, diagnosis, and Expert systems to aid general practitioners, monitoring and control in in-

Volume : 1 / Number : 1 / Year :2011

49

B. KARLIK

tensive care units, design of prosthetics, design of drugs and intelligent tutoring systems for diverse phases of medicine. The area of application of Artificial Intelligence in medicine may either be in diagnostic and educational systems, in expert laboratorial information systems, or machine learning systems that possibly involve new forms of knowledge (Uttreshwar G.S. and Ghatol A.A. 2008). Artificial Intelligence could facilitate the creation and application of medical knowledge, explicitly in the generation of alerts or reminders, provision of diagnostic support, judging on therapy critiquing and planning. Artificial Intelligence methods should have a good comprehensibility to support computer-aided medical diagnosis as medical diagnosis demands highly reliable performance. The machine learning techniques could be beneficial once it is possible to check and describe the diagnostic process. Symbolic and connectionist are the two common categories of machine learning techniques (particularly, artificial neural networks). These learning techniques have been applied comprehensively in Medical diagnosis (Zhi-Hua Zhou, Yuan Jiang, 2003; Karlk B. and Apar T. G. 2009; Okatan A., Karlk B., Demirezen F. 2009; z H. R., Karlk B., Evrensel C.A. 2009; Ceylan R., Ozbay Y., Karlk B.,2009; Karlk B. and Kul S. 2009). Moreover, many statistical analyses are on the records of this database in order to diagnose hepatitis disease during the treatment. Both Artificial Neural Networks and Statistical Methods have been the most efficient and effective inductive learning algorithms for machine learning and data mining (Maiellaro P. A., Cozzolongo R., Marino P. 2004; Dragulescu A., Albu A., Gavrilua C., Filip , Menyhardt K. 2006; Modjtaba R. and Haghighi, M.M. 2009; Jajoo, R., Mital, D., Haque, S., and Srinivasan, S. 2002; Lin, W. and Tang, J. 1999; Nimino M.C. 2007; Cazzaniga M., Borroni G., Ceriani R., Guerzoni P., Casiraghi M., Salerno F.;Vural R.A., zylmaz L., Yldrm T.A. 2006). In this study, computerized diagnostic performance of hepatitis disease was investigated by various classifiers, such as neural Networks and Naive Bayes, which have been used for this purpose. The results of diagnostic performance of both classifiers for hepatitis disease have been found highly reliable.

50

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

2. What Is Hepatitis? The liver is one of the body's powerhouses. It helps process nutrients and metabolizes medication. The liver also helps clear the body of toxic waste products. The word hepatitis (pronounced: heh-puh-tie-tus) means an inflammation of the liver, and it can be caused by one of many things - including a viral or bacterial infection, liver injury caused by a toxin (poison), and even an attack on the liver by the body's own immune system. Although there are several forms of hepatitis, the condition is usually caused by one of three viruses: hepatitis A, hepatitis B, or hepatitis C virus. The hepatitis virus is a mutating virus, which means that it changes over time and can be difficult for the body to fight. In some cases, hepatitis B or C can destroy the liver (http://orissa.gov.in/portal/LIWPL/event_archive/ Events_Archives/ 88Hepatitis_Day.pdf) and the patient then will need a liver transplant to survive, which is not always available or successful. 2.1 Signs and Symptoms Hepatitis is an inflammation of the liver characterized by malaise, joint aches, abdominal pain, vomiting 2-3 times per day for the first 5 days, defecation, loss of appetite, dark urine, fever, hepatomegaly (enlarged liver) and jaundice (icterus, yellowing of the eyes and skin). Some chronic forms of hepatitis show very few of these signs and are only present when the longstanding inflammation has led to the replacement of liver cells by connective tissue; this disease process is referred to as cirrhosis of the liver. Certain liver function tests can also indicate hepatitis (http://digestive.niddk.nih.gov/ddiseases/pubs/viralhepatitis/). 2.2 Types of hepatitis There are 5 types of hepatitis - A, B, C, D, and E - each caused by a different hepatitis virus. 2.2.1 Hepatitis A Hepatitis A or infectious jaundice is caused by a picornovirus. It is transmitted by the orofecal route, transmitted to humans through methods such as contaminated food. It causes an acute form of hepatitis and does

Volume : 1 / Number : 1 / Year :2011

51

B. KARLIK

not have a chronic stage. The patient's immune system makes antibodies against hepatitis A that confer immunity against future infection. People with hepatitis A are advised to rest, stay hydrated and avoid alcohol (http://digestive.niddk.nih.gov/ddiseases/pubs/viralhepatitis/). 2.2.2 Hepatitis B Hepatitis B is caused by a hepadnavirus, which can cause both acute and chronic hepatitis. Chronic hepatitis develops in the 15% of patients who are unable to eliminate the virus after an initial infection. Identified methods of transmission include blood (blood transfusion, now rare), tattoos (both amateur and professionally done), sexually (through sexual intercourse or through contact with blood or bodily fluids), or in utero (from mother to her unborn child, as the virus can cross the placenta). However, in about half of cases the source of infection cannot be determined. Blood contact can occur by sharing syringes in intravenous drug use, shaving accessories such as razor blades, or touching wounds on infected persons. Patients with chronic hepatitis B have antibodies against hepatitis B, but these antibodies are not enough to clear the infection that establishes itself in the DNA of the affected liver cells. The continued production of virus combined with antibodies is a likely cause of immune complex disease seen in these patients. A vaccine is available that will prevent infection from hepatitis B for life. There are three, FDA-approved treatment options available for people with a chronic hepatitis B infection: alphainterferon, adefovir and lamivudine. In about 45% of persons on treatment achieve a sustained response (http://orissa.gov.in/portal/LIWPL/ event_archive/Events_Archives/88Hepatitis_Day.pdf). 2.2.3 Hepatitis C Hepatitis C (originally "non-A non-B hepatitis") can be transmitted through contact with blood (including through sexual contact where the two parties' blood is mixed). Hepatitis C may lead to a chronic form of hepatitis, culminating in cirrhosis. It can remain asymptomatic for 10-20 years. No vaccine is available for hepatitis C. Patients with hepatitis C are prone to severe hepatitis if they contract either hepatitis A or B, so all hepatitis C patients should be immunized against hepatitis A and hepatitis

52

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

B if they are not already immune. However, hepatitis C itself is a very lethal virus and it can result in death, most people who have gotten hepatitis C have died, and the virus can cause cirrhosis of the liver. The virus, if detected early on can be treated by a combination of interferon and the antiviral drug ribavirin. The genotype of the virus determines the rate of response to this treatment regimen (http://orissa.gov.in/portal/LIWPL/ event_archive/Events_Archives/88Hepatitis_Day.pdf). 2.2.4 Hepatitis D and E Hepatitis D is caused by the virus HDV. You can only get hepatitis D if you are already infected with hepatitis B. It is spread through contact with infected blood, dirty needles that have HDV on them and unprotected sex (not using a condom) with a person infected with HDV. Hepatitis D causes swelling of the liver. Hepatitis E produces symptoms similar to hepatitis A, although it can take a fulminate course in some patients, particularly pregnant women (http://orissa.gov.in/portal/LIWPL/event_archive/Events_Archives/88Hepatitis_Day. pdf). 3. Diagnosing Hepatitis by Using Naive Bayes Classifier Naive Bayes classifier greatly simplifies learning by assuming that features are independent for a given class. Although being independent is mostly a poor assumption, it is much practical to use Naive Bayes classifier, which is a simple probabilistic one, whose application is based on Bayes Theorem with strong (naive) independence assumptions. Depending on the precise nature of the probability model, naive Bayes classifiers can be trained very efficiently in a supervised learning setting. In many practical applications, parameter estimation for naive Bayes models uses the method of maximum likelihood; in other words, one can work with the naive Bayes model without believing in Bayesian probability or using any Bayesian methods. In spite of their naive design and apparently over-simplified assumptions, Naive Bayes classifiers often work much better in many complex realworld situations than one might expect. Recently, careful analysis of the Bayesian classification problem has shown that there are some theoretical

Volume : 1 / Number : 1 / Year :2011

53

B. KARLIK

reasons for the apparently unreasonable efficacy of Naive Bayes classifiers [Kotsiantis S., Pintelas P., 2004]. The naive Bayes probabilistic model can be described as the probability model for a classifier is a conditional model; (C ) p ( F1 ,..., Fn | C ) p(C|F1, ..., Fn) = p (1)
p ( F1 ,..., Fn )

It can be written as prior likelihood posterior =

In practice, we are only interested in the numerator of that fraction, since the denominator does not depend on C and the values of the features, Fi are given, so that the denominator is effectively constant. The numerator is equivalent to the joint probability model p(C, F1, ..., Fn) which can be rewritten as follows, using repeated applications of the definition of conditional probability: p (C ) p ( F1 ,..., Fn | C ) p(C, F1, ..., Fn)= = p (C ) p ( F1 | C ) p ( F2 ,..., Fn | C , F1 ) p ( F1 ,..., Fn ) (3) = p(C ) p( F1 | C ) p( F2 ,..., Fn | C , F1 ) p( F3 ,..., Fn | C , F1 , F2 ) = p(C ) p( F1 | C ) p( F2 ,..., Fn | C , F1 ) p( F3 ,..., Fn | C , F1 , F2 ) p( F4 ,..., Fn | C , F1 , F2 , F3 ) and so forth. Now the "Naive" conditional independence assumptions come into play: Assume that each feature Fi is conditionally independent of every other feature Fj for ji. This means that p ( Fi | C , Fj ) = p ( Fi | C ) and so the joint model can be expressed as, p(C, F1, ..., Fn)= p (C ) p ( F1 | C ) p ( F2 | C ) p ( F3 | C )... =
n

evidence

(2)

p(C ) p( Fi | C ) (4)
i =1

This means that under the above independence assumptions, the condi-

54

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

tional distribution over the class variable C can be expressed like this:

n 1 p(C, F1, ..., Fn) = p (C ) p ( Fi | C ) z i =1 (5) where Z is a scaling factor dependent only on F1,..,Fn, i.e., a constant if the values of the feature variables are known (Kotsiantis S., Pintelas P., 2004). Models of this form are much more manageable, since they are factored out into a so-called class prior p(C) and independent probability distributions p(Fi|C). If there are k classes and a model for p(Fi) can be expressed in terms of parameters r, then the corresponding Naive Bayes model will have (k1) + nrk parameters. In practice, often k =2 (binary classification) and r =1 (Bernoulli variables as features) are common, and so the total number of parameters of Naive Bayes model is 2n + 1, where n is the number of binary features used for prediction (Domingos, P. Michael P. 1997). All model parameters (i.e., class priors and feature probability distributions) can be approximated with relative frequencies from the training set. These are maximum likelihood estimates of the probabilities. The discussion so far has derived the independent feature model, that is, the naive Bayes probability model. Naive Bayes classifier combines this model with a decision rule. One common rule is to pick the hypothesis that is most probable; this is known as the maximum a posteriori or MAP decision rule. The corresponding classifier is the function classify defined as follows:

classify ( f1 ,..., = f n ) arg max c = p(C c) p = ( Fi f= c) (6) i |C


i =1

In this study, RapidMiner program was used to classify hepatitis data. RapidMiner is the most comprehensive open-source software for intelligent data analysis, data mining, estimation, classification and forecasting. RapidMiner is implemented in Java and available under GPL (GNU General Public License) as well as under a developer license (OEM license) for closed-source developers (http://www.rapidminer.com). Dataset domain contains hepatitis patient information like age, gender, diagnostic results

Volume : 1 / Number : 1 / Year :2011

55

B. KARLIK

of patient and current status of patient as two classes as normal or abnormal. In this normalized data set consists of 20 attributes in type of numeric or nominal values, and totally 155 number of data set are recorded as hepatitis dataset (http://www.ics.uci.edu/pub/ml-repos/machinelearning-databases/,2003.ax). In this study, we chose 15 attributes from dataset which are listed below; 1. Class: DIE, LIVE 2. AGE: 10, 20, 30, 40, 50, 60, 70, 80 3. SEX: male, female 4. STEROID: no, yes 5. ANTIVIRALS: no, yes 6. FATIGUE: no, yes 7. MALAISE: no, yes 8. ANOREXIA: no, yes 9. LIVER BIG: no, yes 10. LIVER FIRM: no, yes 11. SPLEEN PALPABLE: no, yes 12. SPIDERS: no, yes 13. ASCITES: no, yes 14. VARICES: no, yes 15. BILIRUBIN: 0.39, 0.80, 1.20, 2.00, 3.00, 4.00 As can be seen in Fig. 1, the BILIRUBIN and AGE attributes appear to be continuously-valued. The other attributes are logical values (yes/no as 1/0 respectively). The test results show high recognition accuracy (97%). If we use all 20 attributes which some of them have missing data, recognition accuracy is found approximately 86%. 4. Diagnosis Hepatitis Using Backpropagation Classifier Backpropagation training with generalized delta learning rule is an iterative gradient algorithm designed to minimize the root mean square error between the actual output of a multilayered feed-forward neural networks and a desired output. Each layer is fully connected to the previous layer, and has no other connection. The algorithm of Backpropagation

56

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

Figure 1. Main Screenshot of RapidMiner (Data View) classifier can be described; Initialization: Set all the weights and biases to small real random values. Presentation of input and desired outputs: Present the input vector x(1), x(2),,x(N) and corresponding desired response d(1),d(2), ,d(N), one pair at a time, where N is the number of training patterns. Calculation of actual outputs: Use Equation given below to calculate the output signals

y1 , y2 ,..., yNM

' i = 1,..., N M 1
(7) yi ( wij xj + bi )
( M 1) ( M 1) ( M 1) j =1 N M 1

Volume : 1 / Number : 1 / Year :2011

57

B. KARLIK

Adaptation of weights (wij) and biases (bi): wij (i 1) (n) = x j (n) i (i 1) (n)

bi (i 1) (n) = i (i 1) (n)

(8) (9)

where
i
( i 1)

(10) where xj(n) represents output of node j at iteration n, l is layer, k is the number of output nodes of neural network, M is output layer, is activation function. The learning rate is represented by . It may be noted here that a large value of the learning rate may lead to faster convergence but may also result in oscillation. In order to achieve faster convergence with minimum oscillation, a momentum term may be added to the basic weight updating Eq. (6). In this study, a three-layered feed-forward neural network was used and trained with the error Backpropagation algorithm. Number of 155 normalized data has been used for training. The learning rate was found as 0.95 giving different coefficient values between 0 and 1. The weights of neural networks were initialized to random values. And then networks were run until at least one of the following termination conditions satisfactory. The average of recognition rates were found % 98 as seen in Fig.2. 5. Conclusions Artificial Intelligence techniques, as well as the implemented system offer the possibility to diagnose patient illness in time. The hepatitis treatment is very expensive and severe side effects can appear very often. Therefore, it is important to identify those patients who most probably can react to the treatment, so that the others can be protected from a treatment with no benefits. This is how the use of such system can support the physician decision concerning the treatment (Dragulescu A., Albu A., Gavrilua C., Filip , Menyhardt K. 2006).
Journal of Science and Technology

'(neti ( i 1) ) [ di yi (n) ] , I = M ( n) = '(neti ( i 1) ) wki k ( i ) (n),1 I M k

58

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

Figure 2. Main Screenshot of Backpropagation Classifier In this study, two classifier methods (Backpropagation and Naive Bayes) were used to diagnose hepatitis. Both Backpropagation and Naive Bayes methods often work much better in many complex real-world situations than one might expect. An advantage of these classifiers is that they require a small amount of training data to estimate the parameters (means and variances of the variables) necessary for classification. Despite its unrealistic independence assumption, Naive Bayes classifier is highly effective in practice since its classification decision may often be correct even if its probability estimates are inaccurate. Because independent variables are assumed, only the variances of the variables for each class need to be determined and not the entire covariance matrix. In future work, we can compare these two methods with the other wellknown classifiers methods such as Fuzzy classifier, Support Vector Machines (SVM), Radial Basis Function (RBF) or Conic Section Function (CSF) neural networks, Learning Vector Quantization (LVQ), k nearest neighbors and others.
Volume : 1 / Number : 1 / Year :2011

59

B. KARLIK

References Cazzaniga M., Borroni G., Ceriani R., Guerzoni P., Casiraghi M., Salerno F. Artificial Neural Networks (ANN) to Predict Cirrhosis in Chronic Hepatitis C (CHC). Comparison with a Logistic Regression (LG) Model, Journal of Hepatology, Vol.48, pp. S270-S270 Ceylan R., Ozbay Y., Karlk B.,2009 A Novel Approach for Classification of ECG Arrhythmias: Type-2 Fuzzy Clustering Neural Network, Expert Systems with Applications, Vol. 36, issue. 3, part.2, 6721-6726 Domingos, P. Michael P. 1997 On the optimality of the Simple Bayesian Classifier Under Zero-one Loss, Machine Learning, Vol. 29, pp. 103-137 Dragulescu A., Albu A., Gavrilua C., Filip , Menyhardt K. 2006 Statistical Analyses and Artificial Neural Networks for Prognoses in Hepatitis C, Acta Polytechnica Hungarica, Vol. 3, No. 3 http://digestive.niddk.nih.gov/ddiseases/pubs/viralhepatitis/ http://orissa.g ov.in/por tal/LIWPL/event_archive/Events_ Archives/88Hepatitis_Day.pdf http://www.ics.uci.edu/pub/ml-repos/machine-learning-databases/,2003.ax http://www.rapidminer.com Jajoo, R., Mital, D., Haque, S., and Srinivasan, S. 2002. Prediction of Hepattis C Using Artificial Neural Network. Proceedings of the 7th International Conference on Control, Automation, Robotics and Vision, Dec. 2-5, IEEE Xplore Press, USA, pp: 1545-1550.

60

Journal of Science and Technology

Hepatitis Disease Diagnosis Using Backpropagation and the Naive Bayes Classifiers

Karlk B. and Apar T. G. 2009 Development of Effective Telemedicine Software for Epileptic Seizure Recognition, Inter. Journal of Computing & Information Technology, Vol. 1(2), pp. 91-99 Karlk B. and Kul S. 2009 Diagnosis of Lumbar Disc Hernia Using Wavelet Transform and Neural Networks, Ukrainian Journal of Telemedicine and Medical Telematics, vol. 7, No.1, pp. 10-15 Kotsiantis S., Pintelas P., 2004 Increasing the Classification Accuracy of Simple Bayesian Classifier, Lecture Notes in Artificial Intelligence, AIMSA2004, Springer-Verlag Vol 3192, pp. 198207 Lin, W. and Tang, J. 1999 An Expert System for Diagnosis of Fulminant Hepatitis. Proceedings of the 4th Annual IEEE Symposium on Computer-Based Medical Systems, May 12-14, IEEE Xplore Press, Baltimore, MD, USA, pp: 330-336 Maiellaro P. A., Cozzolongo R., Marino P. 2004 Artificial Neural Networks for the Prediction of Response to Interferon Plus Ribavirin Treatment in Patients with Chronic Hepatitis C, Current Pharmaceutical Design, Vol. 3, pp. 2101-2109 Modjtaba R. and Haghighi, M.M. 2009 The Diagnosis of Hepatitis Diseases by Support Vector Machines and Artificial Neural Networks, International Association of Computer Science and Information Technology Spring Conference, (iacsit-sc), pp.456-458 Nimino M.C. 2007 Autoimmune hepatitis: A Brief Review with an Emphasis on Autoimmune Testing, LABMEDICINE, Vol. 38, Issue. 4, pp. 248-251 Okatan A., Karlk B., Demirezen F. 2009 Detection of Retinopathy Diseases Using Artificial Neural Network Based on Discrete Cosine Transform, Neural Network World, Vol. 19 (2): pp. 215-221

Volume : 1 / Number : 1 / Year :2011

61

B. KARLIK

z H. R., Karlk B., Evrensel C.A. 2009 Application of Artificial Neural Networks Method in Mucus Clearance in Pulmonary Airways, International Journal of Natural and Engineering Sciences, Vol. 3(2), pp. 28-31 Uttreshwar G.S. and Ghatol A.A. 2008, Hepatitis B Diagnosis Using Logical Inference and Self-Organizing Map, Journal of Computer Science, Vol. 4 (12), pp. 1042-1050 Vural R.A., zylmaz L., Yldrm T.A. 2006 Comparative Study on Computerised \ Diagnostic Performance of Hepatitis Disease Using ANNs, Lecture Notes in Computer Science, Vol. 4114/2006, Pages:1177 -1182 Zhi-Hua Zhou, Yuan Jiang, 2003 Medical Diagnosis with C4.5 Rule Preceded by Artificial Neural Network Ensemble. IEEE Transactions on Information Technology in Biomedicine, Vol. 7(1), pp. 37-42

62

Journal of Science and Technology

You might also like