Fuzzy expert system for medical diagnosis
Through this study, a fuzzy expert system developed that employed a set of fuzzy membership functions and rules instead of applying Boolean logic for reasoning about data. Leung et al [
15] defined a general structure of the fuzzy system as the main part of a fuzzy use. The following four stages, carried out in order, describe the structure:
1) Fuzzy functions: Membership functions defined on the input variables are applied to their actual values to determine the degree of truth for each rule premise.
2) Deduction: The truth value for the premise of each rule is computed and applied to the conclusion part of each rule, resulting in one fuzzy subset to be assigned to each output variable for each rule.
3) Combination: All fuzzy subsets assigned to each output variable are combined to form a single fuzzy subset for each output variable.
Defuzzification: This is an optional step that is used when the fuzzy output set needs to be converted to a crisp number.
Medical diagnosis often entails careful examination of a patient to test the existence and strength of symptoms related to a suspected illness in order to decide whether or not the patient suffers from that illness [
11]. Because, for example, a symptom such as hematuria may be very strong for one patient but moderate or very weak for another patient. The method of combining a set of symptoms (features and their strengths) to accurately obtain a diagnosis is determined by the physicians’ experience. In the current study, we utilized the physicians’ experience and saved them in sets of fuzzy tables. Three physicians were asked about the possibility of a disease according to patients’ symptoms. For increasing accuracy and in order to achieve better result, comments from a greater number of physicians could be investigated. However, findings of this study revealed that the comments of three physicians are enough. Through this study, the general model is developed for
n physicians and was examined and resolved for three physicians.
4) Fuzzy deduction applied to create a computer program that can automatically realize the certainty whether a patient with identified symptoms suffers from any one of a set of suspected illnesses. This certainty for every suspected disease specified by a crisp percentage value. We assumed a set of m diseases S and defined a collective set of n features I relevant to these diseases. Let
In order to identify patients’ symptoms, they tested against all symptoms in set I and a fuzzy value allocated to each symptom. Fuzzy values chosen from the following set:
For example, one feature can be determined as < Hematuria, Moderate >. By checking the ill person for all n features of set I and ascribing a suitable fuzzy value for each feature, the set of patient’s symptoms S would be obtained as follows:
Where vi is the fuzzy value allocated to the feature ii when testing the patient, i = 1, …, n.
Adaptation of fuzzy model
Any given disease has a set
R of
k ≤
n related features, which is a subset of collective features set
I.
Table 1 indicates an empty fuzzy table for the disease profile, and it illustrates five fuzzy values for each related feature
ri,
i = 1, …,
k.
Expert physicians must offer suitable values for every entry in the disease profile table based on their experiences. This should be carried out for every disease in the set of considered diseases
S. To demonstrate how should tables be filled,
Tables 2 and
3 are two typical example profile tables for two diseases according to an expert physician. Similar profile tables also obtained for the rest of the considered diseases in the set
S.
In order to diagnose various diseases, some linguistic variables can be assigned including
Yes,
Maybe, and
No as triangular or trapezoidal fuzzy sets. In this study, trapezoidal fuzzy sets considered, as demonstrated in
Fig. 1.
In this study, each physician also asked to weight certain symptoms for a given disease Sj. For instance, a physician asked to identify the importance of dysuria symptom in diagnosis of kidney stone disease. The weightings that each physician assigned to certain symptoms were linguistic variables and selected from the following set:
Similarly, the following trapezoidal fuzzy sets defined for the linguistic variables, as demonstrated in
Fig. 2.
Weights and ratings given by a physician for the symptoms of kidney stones and kidney infections were in
Tables 4 and
5.
Fuzzy pattern recognition for medical diagnosis
Disease symptoms set
M are obtained when a patient is examined for diagnosis. A typical example for a set of symptoms is given in
Tables 6 and
7 for two different diseases, which shows fuzzy values for all features in the collective set
I. These profile tables are considered for all diseases, but here there are tables for two diseases in order to demonstrate how they should be filled out. The strength of a non-measurable feature can logically be determined by a fuzzy value; however, other measurable features, such as proteinuria, hypertension, and blood sugar, can be identified by real values in different scales. The subsection number 2.7 presents those fuzzy features.
Considering q number of physicians observing the disease Sj, the comment of each physician regarding the symptom ri about the possibility of disease Sj calculated as
where i ∈{1, 2,…, n}, j ∈{1, 2,…, m}, p ∈{1, 2,…, q}.
Since each (Yes, Maybe, and No) fuzzy set is defined as fuzzy numbers, xijp is equal to one of the defined fuzzy numbers.
Comments incorporated using the method by Tsaur et al [
16], which combines comments of some experts in order to judge an alternative and makes an overall valuation of the fuzzy judgment. Hybrid fuzzy diagnosis of the possibility of disease
Sj with regards to symptoms
ri can be calculated as
where
aij=1q∑p=1p=qaijp, bij=1q∑p=1p=qbijp, cij=1q∑p=1p=qcijp, dij=1q∑p=1p=qdijp.
Then, the trapezoidal fuzzy number
xij transformed to a crisp number. Assume
xij is the defuzzification of
xij using the center of area method. Thus, the aim is to find a reasonable interval, so that if
xij is classified in that interval, determination of whether it belongs to
Yes or
Maybe or
No linguistic variable could be made. Then, the answer should be considered to
Equations 1–
3.
Hence:
If , then the overall fuzzy decision is No.
If xij ∈(0,x0], then the overall fuzzy decision is Maybe.
If xij ∈(x0,x1], then the overall fuzzy decision is Yes.
xij ∈(x1,100] Then, a hybrid profile table for each kidney disease is made, in order to facilitate the further By utilization of these hybrid diagnosis in the next steps. acquired
Similarly, in order to obtain the total weight of each feature in the diagnosis of disease Sj, wijp can be assumed to be the given weight for ri symptoms in the diagnosis of disease Sj by physician p. Therefore, wijp is defined as one of the above-mentioned trapezoidal fuzzy numbers:
where i ∈{1, 2,…, n}, j ∈{1, 2,…, m}, p ∈{1, 2,…, q}.
So, each of the {Very Low, Low, Medium, High, Very High} fuzzy sets are defined as fuzzy numbers. Thus,
wijp as
equation 10, is equal to one of the fuzzy numbers related to {Very Low, Low, Medium, High, Very High}.
Hybrid fuzzy weight of symptoms ri in diagnosis of disease Sj is calculated as
where
eij=1q∑p=1p=qeijp, fij=1q∑p=1p=qfijp, gij=1q∑p=1p=qgijp, hij=1q∑p=1p=qhijp.
The trapezoidal fuzzy number wij is transformed to a crisp number using the center of area method.
If wij is the defuzzification of wij, let:
s[f] = the crisp number obtained for feature f
rij = jth relevant feature of the ith disease
Pij [rij, v] = certainty of the presence of the ith disease when relevant feature rij has a crisp number xij
δij = diagnosis decision of the ith disease based on relevant feature rij
ki = total number of relevant features for the ith disease
wij = hybrid weight of the rij feature in diagnosing the ith disease
σi = overall diagnosis decision for ith disease.
The impact of the rij feature on the diagnosis decision can be directly obtained from the hybrid profile table obtained Pij[rij, v]. According to the hybrid diagnosis of the three physicians, the fuzzy value v is obtained from the patient’s symptoms for the feature rij as s[rij]. The effect δij is one of the fuzzy sets Yes, Maybe, and No, denoted as
By summarizing the impact of all ki related features, the overall diagnosis decision for the ith disease would be acquired by
The weighting factor
wij is introduced to help physicians determine that some features have more or less importance than other features when diagnosing a disease; therefore, appropriate relative values should be set to the weights. If physicians consider all features with the same importance, the weighting factor is equal for all features. In this case, the weighting step is not necessary and there is no need to fill the weight tables. Then,
Equation 13 can be simplified as;
The final step is to acquire crisp values that specify the certainty of existence for every disease in set S.
The model application
Three physicians considered in the model for this case study. Considering the set of diseases
S, expert physicians’ experiences obtained in a set of fuzzy tables which each set determined the profile for one illness. In order to denote assurance of the illness existence, three trapezoidal fuzzy sets (
Yes,
Maybe, and
No) considered, as are demonstrated in
Fig. 3. Entries in the disease profile tables would be chosen from these fuzzy sets.
Related intervals for No, Maybe, and Yes defined as No = (0, 0, 10, 20), Maybe = (10, 20, 60, 70), Yes = (60, 70, 100, 100); and X0 = 15, X1 = 65.
The following example demonstrates how the model works:
-
Suppose that a given disease si has 10 associated symptoms, all of which have identical weight in the diagnosis. Therefore,
Suppose that comments by three physicians are combined using the mentioned method. When applying Equation 14 to realize the diagnostic decisions (δij, j = 1, …, 10), the result is 7 Yes, 2 Maybe, and 1 No.
-
The overall diagnostic decision is
This fuzzy set is illustrated in
Fig. 4.
Therefore, the crisp decision value for disease
di is calculated as shown in
Equation 18. If the results are
Yes for all related symptoms of
di, the decision is 100%.
For this example, the values of
ci and
cy are 0.55 and 0.87, respectively, demonstrating that the certainty of the presence of the considered disease is 89%, as shown in
Fig. 4.
Displacement of measurement attributes
In this research, the signs for quantifiable features such as hypertension and edema are determined as a numeric value. For the sake of simplicity, fixed tables arranged by the physician may be employed to map these numeric values into fuzzy values from the set {Very Low, Low, Moderate, High, Very High}. This solution may be sufficient in some cases; however, the following describe a solution that is more precise and avoids unexpected changes. Glomerular filtration rate (GFR), a test used to determine kidney function, is used for illustration of the point. GFR estimates how much blood passes through tiny filters, or glomeruli, in the kidneys each minute [
17].
Fig. 5 shows five fuzzy sets that map percentage values of GFR. As shown in the figure, GFR levels were very low (0–15), low (15–38), medium (30–60), mild to moderate (60–90), and high (90 and above).
Suppose that the following information is saved in the profile table of disease di:
If the GFR is Medium; certainty of the existence of di will be Maybe.
If the GFR is High, certainty of the existence of di will be Yes.
Therefore, the diagnosis decision
δij for disease
di according to the GFR value of 8% is the upper limit of two fuzzy sets: 0.3
Maybe and 0.6
Yes, as illustrated in
Fig. 6. This can be included in
Equation 13 to evaluate the overall decision.
The above solution can be generalized to contain features that are identified by two numeric values, such as blood pressure, leading to four possible fuzzy sets. The minimum rule should be employed to combine the pairs of fuzzy sets by the AND operator [
11].