Background

Medical diagnosis support systems are gaining acceptance of medical communities and are increasingly used for decision making in difficult diagnostic or therapeutic settings. In this paper, we proposed a medical support system for staging of liver fibrosis based on routine laboratory data.

The research has been carried out on archival data of patients with chronic hepatitis C and reference group of patients with various hepatitis etiologies (hepatitis B virus infection, nonalcoholic steatohepatitis, alcoholic hepatitis), who underwent liver biopsy. The data contains the routine laboratory examinations of peripheral blood, such like blood morphology, coagulation, biochemistry and protein electrophoresis and liver biopsy result. These data, in anonymized form, were obtained from the Dept. of Gastroenterology and Hepatology, Prof. Kornel Gibiński Central Clinical Hospital of the Silesian Medical University in Katowice with the consent of the Head of the Gastroenterology and Hepatology Unit.

Presented approach is used to recognize liver fibrosis stage of patients with hepatitis C virus (HCV) infection. The virus, in the majority of the infected people, is responsible for chronic hepatitis, which ultimately may lead to liver cirrhosis and death. The number of people infected with HCV both in Poland and worldwide is high. According to the Polish National Institute of Hygiene and WHO it is 730 thousand and 150 million [1], respectively. Hepatitis C is a silent disease, hence even 90 % of infected patients are unaware of infection responsible for progressive liver injury. An appropriate pharmacological treatment may slow down or stop a liver damage. Knowledge on the degree of liver fibrosis is important for diagnostic, therapeutic and prognostic reasons. The liver biopsy is still the “gold standard” recommended for assessment of severity of hepatic fibrosis and inflammation, however, this procedure is invasive, expensive, potentially painful and even life-threatening. Moreover, biopsy cannot be repeated in short periods to follow changes in hepatic histology.

Recently, numerous noninvasive biological and physical tests emerged on the medical market conceived to detect advanced hepatic fibrosis and cirrhosis. Unfortunately, the biological tests, like the ELF®[2] or FibroTest®[3], have limited diagnostic specificity [4] and are expensive commercial products. The instrumental methods based on different techniques of measurement of liver stiffness are promising but still not largely introduced to clinical practice [5]. In all validation studies of aforementioned diagnostic methods the liver biopsy is used as the reference technique, however, biopsy itself is an invasive procedure burdened with significant intra- and inter- observer errors [6, 7].

The previous works of authors of this paper [8, 9] have proven that it is possible to estimate liver fibrosis stage, basing on blood tests, but it must be noted that these works were performed on small database. An advantage of the proposed approach over the biopsy is the fact that it does not require hospitalization and can be repeated in regular periods of time without any risk to the patient.

This research is a part of a project aiming to create an on-line E-medical diagnosis support system for non-invasive liver fibrosis recognition [10]. The system should provide an intuitive feedback containing not only a diagnosis, but also its explanation. However, not many solutions offer human-centric approach that would combine reliable classification method with intuitive representation of data. Therefore, granular computing [11, 12] was selected, both from a conceptual as well as algorithmic perspective, in the realization of information model. Using this paradigm, data can be aggregated as many formal representations of information granules: intervals [13], fuzzy sets [14], rough sets [15], shadowed sets [16], or probabilistic sets [17]. There are several works, which prove the usefulness of granular concept [1820]. The effectiveness of the proposed method was compared with other, most commonly used solutions – the k-nearest neighborhood (kNN) variants [21], perceptron neural network [22], Radial Basis Function network [23], random trees [24] and naive Bayes classifier method [25].

Methods

The method was built based on a data set containing 33 different blood attributes collected from 290 chronic viral hepatitis patients from the Dept. of Gastroenterology and Hepatology of the Prof. Kornel Gibiński Central Clinical Hospital of the Silesian Medical University in Katowice as well as 75 patients with other hepatitis etiologies. Due to high count of missing values (over 66 %) in some attributes, eight of them have been eliminated from the set, leaving 25 of them (see Table 1) for further processing. Eliminated attributes did not have values representation for all stages of liver fibrosis.

Table 1 Data set characteristics

A set of patients’ blood attributes (K) has been determined as shown in Table 1. Based on previous research [10], patients’ age has been included as an additional attribute, thus the set K contains 26 attributes. Variable k = 1, …, 26 is used to denote the number of an attribute.

For every patient, the biopsy results have been collected as a reference value. Liver biopsy examination was performed according to the METAVIR scoring system [31]. Fibrosis level was staged on a range of 0–4 with step 1: F0 – no fibrosis, F1 – portal fibrosis without septa, F2 – few fibrosis, F3 – numerous septa without cirrhosis and F4 – cirrhosis.

Many authors point out that some biopsy fibrosis stages are difficult to diagnose, even for experienced doctors [10]. For this reason, after medical consultations, the new classification has been introduced. Instead of F0 and F1 fibrosis stage, the low (n = 1) level class S1 was applied. Instead of F2 and F3, the medium (n = 2) level class S2 was used, while instead of F4 METAVIR cirrhosis, the S3 class (n = 3) was applied. It means that instead of five METAVIR scoring scale, the three S n , n = 1, …, 3 fibrosis classes will be taken into consideration. The new classification scores were introduced to the proposed medical support system.

Blood and age data were grouped according to the biopsy result and assigned to the sets Xk,n, where k = 1, …, 26 is a given blood attribute and the number n = 1, …, 3 describes one of the new fibrosis S n classes. The data is processed for every kth blood and age attribute separately, so every set Xk,n represents the nth fibrosis class of kth attribute. Each set Xk,n includes up to P values, where P is a number of examined patients. For example the set X10,3 comprises values x i , i = 1, …, P'P' ≤ P of the blood attribute k = 10 (ASPT) of all patients, who were diagnosed with fibrosis class n = 3 (S 3 ). It means that theoretically we can create k × n = 26 × 3 = 78 various Xk,n sets. An exemplary set Xk,n is presented in Fig. 1.

Fig. 1
figure 1

The illustration of X k,n set for a given k and n in a value domain

Due to missing values in patients’ data, the cardinality of the X k,n sets is various. Therefore, the granulation process is focused on the values distribution within a set and not cardinality itself.

In the proposed method, medical data are processed to acquire useful information. The medical data processing is realized inside of three functional blocks. The first block, using Xk,n sets, creates intervals based on the justified granulation paradigm. This transition is shown in the left part of Fig. 2. The clouds of black points are described as a series of intervals. In the middle block the intervals are generalized to fuzzy sets using fuzzification procedure. Finally, the intuitive classification algorithm is proposed to merge the obtained results using voting procedure, which is a common approach in advanced biometric systems [26]. The system’s functional diagram in Fig. 2 presents information flow and changes of medical data representation.

Fig. 2
figure 2

Data representation during classification process: clouds of black points (elements of X k,n sets), series of intervals and fuzzy sets. The intuitive classification algorithm merges the obtained results using voting procedure

Information mining using justified granulation method

As mentioned before, due to missing data, the cardinality of X k,n sets varies. Therefore, the granulation process is focused on the values distribution within a set and not cardinality itself. Direct analysis of the raw blood and age attributes for fibrosis stage evaluation could be troublesome, therefore the justified granularity paradigm [27] was adopted for this task. This data mining technique creates an interval granule over a set X k,n . To find an interval representation over a X k,n set, its left and right boundary is determined using information function V family, defined in Eq. 1:

$$ \begin{array}{l}{V}_r\left({x}_i,{X}_{k,n},\alpha \right)={f}_1\left( card\left(\left\{{x}_j\in {X}_{k,n}:{\overline{x}}_{k,n}<{x}_j\le {x}_i\right\}\right)\right)\times {f}_2\left(\left|{\overline{x}}_{k,n}-{x}_i\right|\right),\\ {}{V}_l\left({x}_i,{X}_{k,n},\alpha \right)={f}_1\left( card\left(\left\{{x}_j\in {X}_{k,n}:{\overline{x}}_{k,n}<{x}_j\ge {x}_i\right\}\right)\right)\times {f}_2\left(\left|{\overline{x}}_{k,n}-{x}_i\right|\right),\end{array} $$
(1)

where:

$$ {\overline{x}}_{k,n}= median\left({X}_{k,n}\right), $$
$$ {f}_1(u)=u, $$
$$ {f}_2(z)= \exp \left(-\alpha z\right), $$

X k,n - set contains values of kth blood attribute of patients with the nth fibrosis class,

\( {\overline{x}}_{k,n} \) - median over a set X k,n ,

α- specificity parameter α = [0, α max ].

The intuitive character of V family function was illustrated in Fig. 3.

Fig. 3
figure 3

The illustration of X k,n set for given α in value domain. The functions V l and V r assume maximal values in proximity of local concentration of groups of elements of the set

If the elements of the set are uniformly distributed then the maximum of V function is directly affected by α value. The functions V l and V r favor the boundary values of a set for α = 0 to values close to median for α = α max . In practice, for values α ∈ (0, α max ), the V function family assumes maximal values in proximity of local concentration of groups of elements of the set. These values can be treated as characteristic representation of a set for a given α. The balance between cardinality of the set and concentration of values inside of this set can be tuned using α parameter. Using defined α value the representation of information granule g k,n,α  = G(X k,n, α), as interval [a1,k,n,α, a2,k,n,α] can be determined by finding the values for both v l and v r functions according to Eq. 2.

$$ \begin{array}{l}{g}_{k,n,\alpha }=G\left({X}_{k,n,\alpha}\right)=\left[{a}_{1,k,n,\alpha },{a}_{2,k,n,\alpha}\right]\\ {}{a}_{1,k,n,\alpha }={v}_l\left({X}_{k,n},\alpha \right){=}_{x_{i\in }{X}_{k,n}}^{\arg max\kern0.5em \left\{{V}_l\left({X}_{k,n},{x}_i,\alpha \right)\right\}}\\ {}{a}_{2,k,n,\alpha }={v}_r\left({X}_{k,n},\alpha \right){=}_{x_i\in {X}_{k,n}}^{\arg max\kern0.5em \left\{{V}_r\left({X}_{k,n},{x}_i,\alpha \right)\right\}}\end{array} $$
(2)

Before going to the next stage, the specificity parameter α value should be normalized from [0, α max ] to [0,1]. The normalization procedure was described thoroughly in [27, 32].

Eq. 2 provides a balance between the specificity of a granule and its size. The advantage of proposed method over other solutions is only one parameter to tune. Moreover, the α value influences the area where the group of values is searched. The interval representing a set is found by its left and right boundary according to Eq. 2. An example of V l functions family, which values was normalized to [0,1], is shown in Fig. 4.

Fig. 4
figure 4

The example of normalized V l function for various α value. The maximal value of V l function, for given α, allows to find a local concentration of elements within X k,n set

The v l function values represent maximal values of V l function for given α, thus allows to find a local concentration of elements within X k,n set. The granulation algorithm (G), which finds an interval representation for a given α and X k,n set, is defined as follows:

  1. 1.

    Calculate value a 1 , k,n,α  = v l (X k,n , α).

  2. 2.

    Calculate value a 2,k,n,α  = v r (X k,n , α).

  3. 3.

    Construct information granule g k,n,α = [a 1,k,n,α , a 2,k,,n,α ].

The granulation algorithm processes elements of a set to find its representation. Therefore, performing z ∈  -cuts equally distributed within a range [0,1], will allow to finding a characteristic values for each set. To find the pattern within all ranges of specificity level, as illustrated in Fig. 4, the series of z interval granules for α i , i ∈ {0, …, z − 1} are built, where values of α i are equally distributed within [0,1]:

$$ {\alpha}_i=\left\{\begin{array}{lll}0\hfill & :\hfill & z=1\hfill \\ {}\frac{i}{z-1}\hfill & :\hfill & z>1\hfill \end{array},i\in \left\{0,\dots, z-1\right\}\right\} $$
(3)

The result for parameter z = 3 is a sequence of three granules generated for α i  ∈ {0, 0.5, 1}.The example for blood RBC attribute, in comparison with histogram, is presented in Fig. 5 for each class.

Fig. 5
figure 5

The RBC attribute interval representation for class 0, 1 and 2 respectively: (a) histogram (b) generated interval granules for z = 3

The proposed approach does not favor the class with higher number of samples. Moreover, the received intervals illustrate a change within a set. Intervals are crisp and do not take under consideration values which are lying in close proximity to its boundaries. Thus, fuzzification was proposed in next step to consider this feature.

Interval fuzzification procedure

The process of changing interval representation of information granule to fuzzy set adds an uncertainty level. Based on two interval information granules constructed over set X k,n (\( {g}_{\mathsf{k},\mathrm{n},{\mathit{\mathsf{\alpha}}}_{\mathit{\mathsf{0}}}}\mathrm{and}\ {g}_{\mathsf{k},\mathrm{n},{\mathit{\mathsf{\alpha}}}_{\mathit{\mathsf{j}}}} \), where j ∈ {0, …, z − 1}), a fuzzy set granule \( {\overline{g}}_{k,n,{a}_0},{\alpha}_j \) is build. In the proposed method, the α0 is constant value equals 0 and it represents all values of the X k,n set. The granulation function \( \tilde{G} \), which constructs fuzzy granule and its membership function, was defined as follows:

$$ \tilde{G}:\left({g}_{\mathrm{k},\mathrm{n},{\alpha}_0},{g}_{\mathrm{k},\mathrm{n},{\alpha}_{\mathrm{j}}}\right)\to {\tilde{g}}_{k,n,{\alpha}_0,{\alpha}_j}, $$
(4)

\( {\tilde{g}}_{k,n,{\alpha}_0,{\alpha}_j}\equiv {\tilde{g}}_{k,n,0,{\alpha}_j}=\left({b}_1,{b}_2,{b}_3,{b}_4\right), \), where:

$$ {b}_1= \inf \left({\mathit{\mathsf{g}}}_{k,n,0}\right)={a}_{1,k,n,0}, $$
$$ {b}_2= \inf \left({\mathit{\mathsf{g}}}_{k,n,{\alpha}_{\mathrm{j}}}\right)={a}_{1,k,n,{\alpha}_j}, $$
$$ {b}_3= \sup \left({\mathit{\mathsf{g}}}_{k,n,{\alpha}_j}\right)={a}_{2,k,n,{\alpha}_j}, $$
$$ {b}_4= \sup \left({\mathit{\mathsf{g}}}_{k,n,0}\right)={a}_{2,k,n,0} $$
$$ {\mu}_{{\tilde{g}}_{k,n,0,{\alpha}_j}}\left(x,d\right)=\left\{\begin{array}{lll}\frac{x-{b}_1\left(1-d\right)}{b_2-{b}_1\left(1-d\right)}\hfill & :\hfill & x\ge {b}_1\left(1-d\right)\kern1em and\kern0.5em x<{b}_2\hfill \\ {}\frac{b_4\left(1+d\right)-x}{b_4\left(1+d\right)-{b}_3}\hfill & :\hfill & x\le \left(1+d\right)\kern1em and\kern0.5em x\kern0.5em >\kern0.5em {b}_3x\in \boldsymbol{R},d\in \left[0,1\right]\hfill \\ {}1\hfill & :\hfill & x\ge {b}_2\kern0.5em and\kern0.5em x\le {b}_3\hfill \\ {}0\hfill & :\hfill & otherwise\hfill \end{array}\right., $$

where:

k- number of an attribute,

n- liver fibrosis class,

d - generalization parameter d ∈ [0, 1],

α j - jth α-cut evaluated using Eq. 3, j ∈ {0, …, z − 1},

α0- constatnt equal 0 in the equation,

z - number of cuts,

inf/ sup - lower/upper boundary of an interval (g granule).

The proposed granule \( {\tilde{g}}_{k,n,0,{\alpha}_j} \) describes the nth class of liver fibrosis for a given kth attribute and jth α-cut. The boundary values of \( {\tilde{g}}_{k,n,0,{\alpha}_j} \) are represented by constant α 0  = 0, therefore b 1 and b 4 will always assume respectively minimal and maximal value of X k,n set. The trapezoidal fuzzy membership function μ(x) was selected as intuitive fuzzy representation of two intervals. Moreover, this set representation simplifies the calculations and was successfully applied in many medical works [28, 29]. Finally, the initial experiments with other fuzzy representation e.g. Gaussian, triangle, bell-shape did not have impact on model accuracy. The introduced in Eq. 4 generalization parameter (d), illustrated in Fig. 6, allows to take under consideration the values, which are laying in close proximity of a granule, but are not a part of it.

Fig. 6
figure 6

\( \tilde{g} \) membership function for a given αj and changing d parameter: (a) example, (b) real estimated data for Age attribute

Figure 6 b shows changes within the age attribute. The created granules for α = 0 overlap significantly between classes n = 1,…,3, thus they provide a little useful information for classification purposes. Moreover, the median calculated for 2nd and 3rd class (n) is placed almost in the same place - around 55 years. Nevertheless, the shapes of fuzzy sets for α ∈ (0, 1) differ significantly and therefore can be used as information to find the correct fibrosis class. The fuzzy set for α j =0.5 and α j =1.0 (Fig. 6 b) provides more information as offering smaller overlap of the sets. To improve classification accuracy the attributes, which sets overlap significantly [33], are removed from further classification. Only selected set of attributes K' ⊂ K with the smallest overlap of fuzzy intervals between all fibrosis classes, are processed further.

Classification process

The created granular model is used to evaluate the classes of liver fibrosis for test patients. The data of a given patient is compared with the model using membership function \( {\mu}_{{\tilde{g}}_{k,n},0,{\alpha}_j}\left({y}_{k,d}\right) \), where y k is the medical examination result of a patient for a given kth attribute. The membership function provides information, whether or not a patient has nth liver fibrosis class, according to kth attribute. The aggregation (averaging) over all attributes (k) is performed for each αj,j = 0.. z − 1 and nth class separately. As a result, the average value for each class is evaluated. Finally, the voting is performed based on the values obtained for each of z α-cuts. The motivation of voting was based on the physician analysis scheme, where similarities of symptoms are analyzed. In this case, the classification procedure weight, how many fuzzy granules favor a given class. The aggregation and classification process is illustrated in Fig. 7 for two attributes: age (k = 1) and RBC (k = 3).

Fig. 7
figure 7

Classification example illustrated on two attributes: Age (a) and RBC (b). The values of attributes of classified patient are compared against the fuzzy representation of classes. Then, using averaging (c) and weighted voting d, the patient’s fibrosis class is found

The black line in Fig. 7 illustrates the values of attributes of classified patient. If the patient does not have an attribute marked the attribute is not taken into consideration. Using only results for α j = 0 the classification is inconclusive (equal value of membership function for all three classes). For the second and third column (α j =0.5 and α j =1) age attribute favors n = 1 class (marked by blue curve), while RBC attribute favors (b / RBC) n = 3 class (marked by green curve). To find the correct diagnosis the mean value of membership function is calculated for given α j (Fig. 7c). As presented in example average values for α j = 0 carry no information, however the average values for α j equal 0.5 and 1 favors n = 3 class. Finally, the weighted voting is performed between the results acquired for α j  ∈ {0, 0.5, 1}. The class n = 3 with the highest value (w) is selected.

The patient’s classification is performed formally based on his medical data set Y = {y k , k ∈ K}, where y k defines a value of kth attribute. The weight of nth fibrosis can be calculated using a following equation:

$$ {w}_{z,d,K\hbox{'}}\left(Y,n\right)={\displaystyle {\sum}_{j=0}^{z-1}\frac{{\displaystyle {\sum}_{k\in K\hbox{'}}{\mu}_{{\tilde{g}}_{k,n,0,\alpha j}}\left({y}_k,d\right)}}{card\left(K\hbox{'}\right)},{y}_k\in Y} $$
(5)

where: n is a number of fibrosis class, K ' is set of selected attributes, card is cardinality of a set, z and d are the method parameters.

Finally, the class for which w function returns maximal value is treated as the patient’s fibrosis class (Ŝ):

$$ {\widehat{S}}_{z,d,K\hbox{'}}(Y){=}_{n\in \left\{1,\dots, 3\right\}}^{\mathrm{argmax}\left\{{W}_{z,d,K\hbox{'}}\left(Y,n\right)\right\}} $$
(6)

where:

Y- a set of laboratory blood test results of the patient,

n - represent the liver fibrosis class, defined as n = 1, …, 3,

z, d, K' - parameters of proposed method.

The quality of recognition depends on differences between wz,d,K ' function values. Significant difference between calculated weights, for various classes, confirms that quality of diagnosis is high.

Results

After medical consultations 3 classes were selected for representation of 5 liver fibrosis levels - see Table 2.

Table 2 Liver fibrosis medical data distribution

The number of cuts (z) and generalization parameter (d) was calibrated using training data and unified sampling. In first case all 26 available attributes were used. The calibration scheme is presented in Fig. 8. It is worth to note that z is a discrete parameter.

Fig. 8
figure 8

Calibration of proposed method using number of cuts (z - discrete parameter) and generalization parameter (g)

To improve classifier accuracy, the set of analyzed attributes was decreased to the K' set. The dependency between the overall accuracy and number of attributes was analyzed. The results were presented in Fig. 9.

Fig. 9
figure 9

Tuning of proposed method of attributes reduction vs. overall accuracy. The classification is performed only on selected set of attributes (K' ⊂K) with the smallest overlap between all fibrosis classes

The best result was obtained for card(K') = 18. Moreover, for the values from 12 to 21, overall accuracy was improved as well. The attributes reduction, by taking under consideration fuzzy function overlap, improved the overall accuracy by 4 %.

Calibrated model was verified using 10-fold cross validation [30] and the obtained results have been compared with a various, selected classification methods. Results for 290 patients infected with hepatitis C are presented in Tables 3 and 4.

Table 3 Results of the proposed method compared to generic classifiers [21, 22, 24, 25]
Table. 4 Confusion table for Granular Model

Sensitivity and specificity are statistical measures of the performance of a binary classification test. Specificity (sometimes called the true negative rate) measures the percentage of people who are correctly identified as not having this stage of liver fibrosis. Sensitivity (also called the true positive rate) measures the percentage of people who are correctly identified as having the defined stage of liver fibrosis. Comparing to the proposed method the overall accuracy is highest. But, what is even more important from medical point of view that only 6.5 % of the misclassification occurred between the first and the last class. The research was extended to verify the model against patients with various liver disease etiologies. Therefore, the 365 patients’ dataset was used, where the patients with HBV, HCV as well as nonalcoholic/alcoholic hepatitis were included. The result was presented in Tables 5 and 6. The proposed model proved to be superior over various other classifiers. The results are stable and 67.4 % of overall accuracy was achieved. Furthermore, misclassification between the first and the last class decreased to 6.2 %.

Table 5 Results of the proposed method compared to generic classifiers on 365 patients with various etiologies [21, 22, 24, 25]
Table 6 Confusion table for Granular Model for 365 patients with various etiologies

In case, when precise fibrosis class (by METAVIR scale) is required, the method can be applied directly without prior grouping to three classes. In research the dataset of 365 patients with various etiologies was used. The result of five class classification was presented in Tables 7 and 8. The overall accuracy of the method is 52.1 %. The Table 8 shows that using five class classifications the uncertainty of the result must be taken under consideration. However, the majority of misclassification cases are usually made within neighboring classes (111 of all 175). Based on METAVIR scale classification a physician can make more precise decision about future treatment. In future, the analysis will be extended to measure the robustness of method against independent cohort of liver patient from another institution.

Table 7 The method accuracy considering 5 classes of fibrosis by METAVIR scale
Table 8 The confusion matrix presented for 5 class of liver fibrosis classification (METAVIR scale) using the proposed method

Conclusions

Obtained results, on a given data set, are promising and proved to be superior to other classifiers. Moreover, the data representation in form of information granules (intervals and fuzzy sets) can be presented graphically, while the conclusion is made by intuitive voting procedure. Unfortunately, direct comparison against commercial methods is currently impossible, due to unavailable borderline comparison database. Neighboring liver fibrosis stages are often hard to distinguish even by liver biopsy, therefore in the presented research, only three classes of liver fibrosis severity have been defined. Nevertheless, if needed, the model can be used to perform full, five classes, METAVIR classification. The overall accuracy measure (number of samples classified correctly to the number of all samples in the set) which has been chosen to rank different methods is a common, but imperfect measure, as preferably all classes in the test set should have equal cardinalities, which is not fulfilled in the presented case. The proposed method tackled well with uneven classes and missing data, performing balanced diagnosis with relatively high accuracy. The strong points of the method are: use of routine blood tests, good performance on a small subset of parameters, easy principles, and repetitiveness of results (not using random factors).