Hepatitis Diagnosis Using Case-Based Reasoning with Gradient Descent as Feature Weighting Method

Retrieval is one of the stages in case-based reasoning system which find a solution to new problem or case by measuring the similarity between the new case and old cases in the case base. Some of the similarity measurement techniques are involving feature weights that show the importance of the feature in a case. Feature weights can be obtained from a domain expert or by using a feature weighting method either locally or globally. Gradient descent is the feature weighting method which computes global weights for each feature. This research implemented gradient descent to obtain feature weights in case-based reasoning for hepatitis diagnosis and the similarity measurement using weighted Euclidean distance. There were four variations of case base size and test data used in the research; i


I. INTRODUCTION
Case-Based Reasoning (CBR) is a problem-solving method using old experiences with the specific way.Case base is old experiences of problems that have solutions.Every case in case base consists of problem and solution [1][2] [3].
The retrieval process or process of finding old cases that have similarity to a new case is one of the most important processes in CBR system [4] [5].Some of the similarity measurement techniques are involving feature weights.The feature weight can provide information about the importance level of the feature in a case.Thus, the weight of case features is very important in the similarity calculation that involves feature weight.The feature weight can be assigned by an expert or by computation -using a weighting method.The feature weights given by an expert will depend on the experience of the expert [3].
Feature weights can be assigned automatic using a feature weighting method and this way will very useful in a domain that has many features, where it is almost impossible to assign manually by an expert.This way also will very helpful when no one exactly knowledge about feature weight [4].There is much research about hepatitis diagnosis, one of them is hepatitis diagnosis using hybrid CBR and Particle Swarm Optimization (PSO) used UCI dataset [5][6].In this research, every case has 19 number of feature.The case that has many features will be quite difficult to assign feature weight [4].Some feature weighting methods assume that weights are different among local areas of instance space while most methods learn weight settings globally [6].
One of feature weighting method that assigns weight globally is Gradient Descent (GD) method, where this weighting method is significantly superior to other models [2].Gradient Descent is an unsupervised method that has an advantage that performs the task of feature weighting without clustering the feature space explicitly and does not need to know the number of clusters present in the feature space [2].Gradient descent method was used in a research about medical data classification using a combination of CBR and Fuzzy Decision Tree (FDT) [7].The weight of the feature was used in the second stage that is classification cases into several groups using a method of measuring the distance called weighted distance metric.The results of the CB-FDT performance test showed that average accuracy was 99.5% in breast cancer and 85% in liver disease.There is a research about CBR for diagnosis of hepatitis disease using medical record data of hepatitis patients [8].In this research, feature weight assigned by expert and accuracy of the system was 94.29%.
In this research, gradient descent was used to obtain feature weight globally.Gradient descent technique has been used to optimize a model to solve the problem of feature selection, called grafting [9].Similarity measurement in this research was using weighted Euclidean distance method.Weighted Euclidean distance has been used in research about turbine diagnose and accuracy was 90% [10].This method also has been implemented in similarity measure of CBR system and the accuracy was 94.83% [11].

A. Design of Feature Weighting Using Gradient Descent
The process to calculate feature weight using gradient descent method is using feature weight learning approach to minimize feature evaluation index function using equation (1) [12]).
Where N is the number of the case in case base and is similarity value of a pair cases and , with involving trained weights (w) that compute using equation (2).
Where α is positive constant and is weighted Euclidean distance between case p and q that calculated using equation (3).
Where w is feature weights, wjis weight of jth feature and Xj is distance between jth feature of case p and q.
To extract feature weight, the feature evaluation index should be made as minimum using gradient descent by updating a value of (denoted by∆ ) using equation ( 4).

∆ = − (4)
Yufika Sari Bagi & Suprapto Journal of Information Systems Engineering and Business Intelligence, 2018, 4 (1), 25-31 27 For j=1,2, …, n or number of feature, and λ is learning rate.The training algorithm to compute feature weight using gradient descent method is described as follows [4]: 1. Input parameter α and learning rate (λ).This research use α=0.06 and λ=0.05. 2. Initialize weight with random values in [0,1] 3.For each j, compute Δwj using equation (4).4. For each j, update weight wj with wj+ Δwj if wj+ Δwj in [0,1] Compute feature evaluation index (E) using equation ( 1) and check the stop conditions.The stop conditions in this research are if no one features weight was updated and if the value of E is increased.

B. Data and Testing
This research using medical record of hepatitis patient from previous research [8].Numbers of cases are 117, where each case has 52 attributes.The first attribute is the id of a case, the second attribute is the age of the patient, and the third attribute is sex of the patient.The fourth to fifth attribute is symptom factors and the forty-sixth to fifty-first attribute are risk factors of a patient.The fifty-second attribute is hepatitis disease type.In this research the problem feature for each case are age, sex, symptom factors and risk factors, so that number of feature problem for each case are 50 features, while hepatitis disease type that uses in this research are hepatitis A, B, and C.There are two data types those are case base and test data, where case base used on weighting process.Overall of attributes are shown in Table 1.
The attribute of symptom and risk factor will have value 1 if the patient has the symptom or risk factor, otherwise, the attribute will have value 0. Examples of data are shown in Table 2.The testing process is done with 4 variations number of case base and test data those are: first variation using 50% of data as case base and 50% as test data second variation using 60% of data as case base and 40% as test data, third variation using 70% of data as case base and 30% as test data and fourth variation using 80% of data as case base and 20% as test data.For each variation, using 4 kinds of scenario to mark the test data those are in first scenario the test data mark at the end of data, in second scenario the test data mark at the begin of data, in third scenario the test data mark half at the begin and half at the end of data and in the fourth scenario the test data mark in the middle of data.Ten alpha values α = {0.1,0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1} were used in similarity measurement process for each scenario.Similarity measurement using weighted Euclidean distance with equation (2).After the test, the accuracy, recall, and precision will be measured using equation ( 5), ( 6) and ( 7) respectively [13].The result of accuracy, recall and precision measurement of CBR diagnosis using gradient descent (GD) are shown in Table 3  In Table 3, the accuracy of the system using GD was reached 100% where use variation 4 and scenario 1.The average accuracy using GD weights overall can calculate as follows: Average accuracy = 69.57%+ 73.56% + 78.43% + 88.64% 4 = 77.55% Next, the recall measurement is shown in Table 4.The average recall CBR system using GD weights overall can calculate as follows: Average accuracy = 58.22%+ 65.60% + 72.03% + 83.11% 4 = 69.74% Next, the precision measurement is shown in Table 5.The average precision using GD weights overall was 78.39%.

IV. DISCUSSION
According to the result of accurate measurement in Table 3, then the accuracy graph of CBR using gradient descent in every variation shown in Figure 1.
By the graph, in Figure 1 we can see that the accuracy was raised while a number of case base increases and the highest average accuracy were in variation four.From Table 3, we can also see that the accuracy of CBR system using GD was reaching 100% where use variation 4 and scenario 1, wherein this variation using 80% of data as case base and 20% as test data.According to Table 4, the graph of recall was made and shown in Figure 2. By the graph, in Figure 3 we can see that the precision was also raised like accuracy and recall while the number of case base increases.

V. CONCLUSIONS
Based on the experimentations, the number of cases in the case base (or case base size) influenced the accuracy of the system (the average accuracy at variation 4 was the highest).The scenario of case selection for case base also influences the accuracy.Based on the test result, the accuracy of the system reaches 100% at scenario 1 in variation 4. Overall of all four variations and four kinds of scenario, the average accuracy of the system was 77.55%, average recall of system was 69.74%, and the average of precision was 78.39%.In addition, the level of accuracy was also influenced by the number of case base and the scenario of case selection for the case base.This is because more cases in the case base, the chances of a system to finding similar cases will be more.
& Suprapto Journal of Information Systems Engineering and Business Intelligence, 2018, 4 (1), 25-31 correct diagnosis result for the positive data test TN : Number of correct diagnosis result for the negative data test FP : Number of incorrect diagnosis result for the positive data test FN : Number of incorrect diagnosis result for the negative data test III.RESULTS

Figure. 1
Figure.1 Average Accuracy Graph of CBR Using Gradient Descent