Development of Fuzzy Logic-Based Model for Diagnosis of Hepatitis B

ABTRACT. Hepatitis B is an infection of the liver by the hepatitis B virus. According to Nigerian treatment guidelines, it is estimated that about 23 million people in Nigeria are currently affected with the disease. It is a key world-wide health problem. This paper is necessitated with the need to develop a fuzzy logic-based model for proper diagnosis of the virus hepatitis B using blood tests. An extensive interview was conducted with a licenced medical personnel at the federal polytechnic Ile Oluji medical centre located at Ondo state, Nigeria. A fuzzy logic-based system is untaken which is used to simulate the diagnosis of hepatitis B in humans using 3-turple record which are HBsAg (Hepatitis B surface antigen), anti-HBs or HBsAb (Hepatitis B surface antibody) and anti-HBc or HBcAb (Hepatitis B core antibody). Triangular membership function were used to fuzzify both inputs and outputs while the fuzzy inference engine was used to develop the rules using MATLAB fuzzy logic toolbox software. The model will help in proper diagnosis of the virus and steps to be taken for treatment.

. HBV can occur in two phases; acute and chronic. The acute phase refers to a new infection that is less than six months old while an HBV infection that lasts more than six months is chronic. Acute hepatitis B will resolve on its own without serious complications in the majority of newly infected teens and adults. When this occurs, people are no longer contagious and are immune to further HBV infections. However, in people whose infection does not resolve, HBV may be transmitted to others. Chronic hep B can cause fibrosis (mild to moderate liver scarring), cirrhosis (serious liver scarring), liver cancer, liver failure and death. The risk that a hepatitis B infection will become chronic varies according to the age at the time of infection. In the United States, approximately 90 percent of infants and 25 to 50 percent of children under the age of 5 years will remain chronically infected with HBV. In adults, roughly 95 percent recover completely. In the United States, according to the Centers for Disease Control and Prevention (CDC), an estimated 850,000 people have chronic HBV infection. Some experts believe there are up to 2.2 million people with hepatitis B in the United States. The most recent data shows nearly 1,900 people died from hepatitis B-related causes. According to a Consultant Gastroenterologist with the Lagos University Teaching Hospital, Idi-Araba, Lagos, Dr. Olufunmilayo Lesi, Nigeria has one of the highest prevalence of hepatitis B infections in the world. No fewer than 20 million Nigerians are currently living with the disease [2]. One of major reason for the high number is low level of testing among the Nigerian populace which is three times more infectious than HIV/AIDS. Other factors include poor socio-cultural and unhygienic practices. According to Lesi (2016), hepatitis B is one of the most infectious viruses in the world even as it leads to liver failure, cancer and untimely death in infected persons. There is no cure for HBV, but immunization can prevent initial infection. Antiviral medication can treat chronic infections. Adults who have been infected can fight off the virus and the infection cured. It is almost unlikely that adults infected with the virus go on to develop chronic phase of the infection. Most young infants will fail to totally erase the virus from their tiny bodies and then go on to develop the deadly chronic phase infection. About two-thirds of people with chronic HBV infection are chronic carriers. These infected individuals do not initially develop the symptoms even if they house the virus and also can transmit them. The remaining one third develop "active" hepatitis, a disease of the liver that can be very serious [3]. Fuzzy Logic (FL) is a method of reasoning that bear a resemblance to human reasoning. The approach of FL imitates the way of decision making in humans that involves all intermediate possibilities between digital values YES and NO. It can be implemented in systems with various sizes and capabilities ranging from small microcontrollers to large, networked, workstation-based control systems [4]. FL is a means of providing a path for the diagnosis and decision making process due to its ability to deal with uncertainties (fuzziness) and ambiguity which may exist in the knowledge and information relating to a domain of study. Today, medical practitioners have identified possible and promising areas for implementing fuzzy logic systems for medical diagnosis (Mishra et al, 2014). The concept of Fuzzy logic was presented by Lofti A. Zadehn in 1965 based on the fuzzy set theory [5]. FL systems are implemented by the manipulation of membership functions which simulate variables by the inference engine (rule-base) [6]. Membership functions generally quantifies linguistic term and represent them in a fuzzy set graphically. It is a curve that defines how each point in the input space is mapped to a membership value (or degree of membership) between 0 and 1 [7]. This means that every label which is attached a variable, a membership function will be explicitly used to define the level of membership. The input space is referred to as the universe of discourse. A membership function for a fuzzy set defined as Q on the universe of discourse Y is defined as μQ:Y → [0,1]. The element of Y is mapped to a specific value between 0 and I and it is called a membership value or degree of membership which quantifies the degree of membership of the element Y to the fuzzy set Q. Assuming Q is set as the universe of discourse and its elements are denoted by y, a fuzzy set X in Q is defined as a set of ordered pair: X = {y, µx(y) | y ϵ Y} µA(y) is called the membership function (or MF) of y in A. The membership function maps each element of X to a membership value between 0 and 1. For the purpose of this paper, the following listed points must be noted:  The set X defines any input (Hepatitis B Panel" of blood test) or output (likelihood of the diagnosis to be positive);  The set Y is the set of values for which a variable is valid, for example a set Y = whether the result for HBsAg (Hepatitis B surface antigen) test for Hepatitis B Panel" of blood test is positive for value y = 1 and negative (No) for y = 0. Hence for the set Q, the set Y is the set containing {0, 1}; and  µx(y) defines the map of the membership function which will be used to plot the degree of membership. The triangular function is defined by a lower limit a, an upper limit b, and a value m, where a < m < b while trapezoidal function is defined by a lower limit a, an upper limit d, a lower support limit b, and an upper support limit c, where a < b < c < d.  2.0 Related works Sotudian, S. (2016) worked on developing a fuzzy model system From Type-I to Type-II for the diagnosis of HBV. The study presented an effective method for diagnosis of hepatitis based on interval Type-II fuzzy. The system includes three steps: pre-processing (feature selection), Type-I and Type-II fuzzy classification, and system evaluation. KNN-FD feature selection was used as the pre-processing step in order to exclude irrelevant features and to improve classification performance and efficiency in generating the classification model. In the fuzzy classification step, an "indirect approach" was used for fuzzy system modelling by implementing the exponential compactness and separation index for determining the number of rules in the fuzzy clustering approach. The Type-I fuzzy system had an accuracy of approximately 90.9%. In the system, the process of diagnosis faces vagueness and uncertainty in the final decision. Thus, the imprecise knowledge was managed by using interval Type-II fuzzy logic. The results that was obtained show that interval Type-II fuzzy has the ability to diagnose hepatitis with an average accuracy of 93.94%. The classification accuracy obtained was the highest one reached thus far. The aforementioned rate of accuracy demonstrates that the Type-II fuzzy system had a better performance in comparison to Type-I and indicates a higher capability of Type-II fuzzy system for modelling uncertainty [9] Ghumbre Shashikant and Babasaheb Ambedkar (2008) worked on hepatitis B diagnosis using logical inference and self-organizing map. The study investigated the potential of artificial intelligence techniques principally for medical applications. The study analysed the application of artificial intelligence in conventional hepatitis B diagnosis. In the research, an intelligent system that worked on basis of logical inference was utilized to make a decision on the type of hepatitis that is likely to appear for a patient, if it is hepatitis B or not. Then kohonen's self-organizing map network was applied to hepatitis data for predictions regarding the hepatitis B which gives severity level on the patient. The study concluded that the proposed model gives faster and more accurate prediction of hepatitis B and it works as promising tool for predicting of routine hepatitis B from the clinical laboratory data [10]. S. L. Satarkar and M. S. Ali (2013) worked on developing a fuzzy expert system for the diagnosis of common liver disease. The study focused on the diagnosis of Cirrhosis which is one of the common diseases of the liver. The designed system was based on the sequential combination of the Bonacini score, which included AST/ALT ratio, Platelet count and INR. The system had 3 input fields and one output field. Input fields were AST/ALT ratio, Platelet count and INR and the output field referred to the risk of cirrhosis. It is integer valued from 0 to 6. The system used Mamdani Inference method. The results obtained from the designed system was compared with the actual data of patients in the database and observed results of the designed system are well within the limits set by the domain expert [11]. This study further helped in the development of a fuzzy based logic system for HBV 3.0 Methods

Data Identification and Collection
For HBV Panel blood tests, 3 tests were needed. The 3 tests results were needed to fully understand if a person is infected or not. A detailed explanation of the 3-parts of HBV panel blood tests has been described in table 1 above. The 3 tests are HBsAg (Hepatitis B surface antigen), anti-HBs or HBsAb (Hepatitis B surface antibody) and anti-HBc or HBcAb (Hepatitis B core antibody). These test factors were collected after meeting with a medical expert. The HBsAg (Hepatitis B surface antigen) is defined as either: less than 0.01%, between 0.01% and 0.05% and greater than 0.05%; the anti-HBs or HBsAb (Hepatitis B surface antibody) is defined as either: less than 0.05%, between 0.05% and 0.12% and greater than 0.12% while the anti-HBc or HBcAb (Hepatitis B core antibody) was classified as either positive, negative and indeterminate. Along with identifying the variables connected with the test results, the pattern of distribution of the variables was used in picking the best membership function which will then be used in plotting the labels. The number of rules that was developed from the inference engine was which was calculated by multiplying the labels of each variable with each other.

3.2
Fuzzy logic model formulation To develop the fuzzy logic system for diagnosis of HBV, the fuzzy logic system available in the fuzzy logic toolbox of MATLAB R2015a is divided into 3 parts. Figure 2 shows how each part is connected and also factors:  Defining membership function In defining the membership function for the fuzzy based model, the crisp values which was used in mapping the values must be stated in the fuzzy logic. For discrete variables with categorical values, 1,2,3……was used to assign for n labels. For the case of HBcAb (Hepatitis B core antibody), the values assigned are 1 for positive, 0 for negative and 2 for indeterminate. HBsAg (Hepatitis B surface antigen) is assigned continuous variables which are in all expressed in percentage proportion, that is, 1% and 5% read as 0.01 and 0.56 respectively into the appropriate membership functions. The table 2 below provides a detailed description for the values of the labels to be used for with variable along with their respective membership function.

3.4
Fuzzification of the variables Both the triangular and trapezoidal membership functions were implored for this study. These was done to map the degree of membership of the labels of each variable used both in the input and output. For the purpose of this study, three (3) membership function was created for each variables each representing a linguistic variables (label) given a corresponding crisp interval and defined by f(y: a, b, c). It is also noted that all three (3) membership function were framed within the interval of [0, 1] defined for each labels. Below is a table that provides detailed description each variable and the type of membership function used for the labels alongside the ordered pair that was used in mapping the degree of membership for each variable's label.

4.
Results and discussion The process of developing the inference engine and the 18 different rules is shown in table 4 below. The rules were formed using the label i.e. labels which were used to map each interval of membership functions. The rules were simulated using the fuzzy logic inference system on MATLAB R2015a. From the rules, it is then possible to perform diagnosis of HBV using the crisp values. For example, output reads NO when HBsAg is less than 0.01, anti-HBs is less than 0.05 and anti-HBc is negative. When input variables (anti-HBc) reads indeterminate and other two inputs are negative i.e. (HBsAg <= 1% and anti-HBs <= 5%), diagnosis of HBV is NO which means there isn't any trace of HBV in the body system.

No
HBsAg anti-HBc anti-HBs Diagnosis of HBV  variables was used in developing the inference system of the fuzzy system. Each of the input variables were fuzzified and served into the inference engine. There were 18 different rules which were produced after the inference engine has been aggregated to a single output which was then defuzzified to get the crisp variable output (Yes or No). The simulation was done using MATLAB R2015a. The model will help in proper diagnosis of HBV using blood panel test.