The methodology of this study is based on liver diseases classifications according to mix of the features that are extracted from ultrasound images and chemical compounds such as bilirubin, albumin, proteins, alkaline phosphatase; starts with collect images that are labeled into predefined classes normal and abnormal (fatty and cirrhosis) as shown in Fig. 2, This data set contains two different forms, the first dataset that have extracted from ultrasound images [12], it consists of 123 samples of liver divided as 41 for Normal, 41 for Fatty and 41 for Cirrhosis. The second dataset is chemical compounds such as bilirubin, albumin, proteins, alkaline phosphatase, it consists of 583 samples of liver divided as 416 for abnormal, and 167 for normal that are labeled into predefined classes normal and abnormal (fatty and cirrhosis), then feature selection, learning algorithms, and evaluate the classifier.
Figure 2 Samples of the acquired images of normal, fatty and cirrhosis liver
At the onset of our investigation, we embarked on the pivotal task of feature selection—an endeavor geared toward identifying the most pertinent attributes that wield the power to effectively distinguish between classes within the dataset. This approach stands as an adept solution in resolving the complexities inherent to high-dimensional data scenarios. Our toolkit comprises a trio of robust statistical techniques: Information Gain, Chi-Square, and Gain Ratio methodologies [13]. These techniques, grounded in sound statistical principles, play a crucial role in quantifying the significance of attributes. Illustrated in Fig. 3 and Fig. 4, we present a visual representation of this intricate process, spotlighting the attributes that rise to prominence with the highest rankings for each respective technique. Notably, the gain ratio, defined by Eq. 4, stems from the calculation of attribute gain via Eq. 3. The attribute boasting the utmost gain ratio is judiciously chosen as the pivotal splitting attribute, facilitating streamlined classification. Similarly, the Chi-Square technique, expounded upon by Eq. 2, stands as an essential contributor in the attribute selection process. Finally, the Information Gain, framed within Eq. 1
$$nfo\left(D\right)=-{\sum }_{i=1}^{n}{P}_{i} {log}_{2} \left({P}_{i}\right)$$
1
$${X}_{C}^{2}= \sum \frac{\left(Observed values-Expected values\right)2}{Expected values} = \sum \frac{\left({O}_{i- }{E}_{i }\right)2}{{E}_{i }}$$
2
The term \({X}_{C}^{2}\) represents the squared difference between the observed (O) and expected (E) values, divided by the expected value within one or more classes (C).
The gain ratio serves as an enhancement of the information gain, specifically designed to mitigate its inclination towards attributes with extensive branching. Computed as per Eq. 3, the gain ratio offers a refined perspective. Ultimately, the attribute exhibiting the highest gain ratio is singled out as the optimal candidate for splitting, following the principles outlined in Eq. 4
\(SplitInfo A\left(D\right)\) = \(-{\sum }_{j=1}^{n}\frac{\left|Dj\right|}{\left|D\right|} x\) log2 (\(\frac{\left|Dj\right|}{\left|D\right|}\)) (3)
Gain Ratio (A) = \(\frac{Gain\left(A\right)}{SplitInfo \left(A\right)}\) (4)
Learning algorithms are engineered with the objective of constructing classification models or training the algorithm itself to discern patterns and crucial characteristics for each category. This process unfolds through utilizing a training dataset, allowing the algorithm to form predictions regarding the category of liver disease. Various algorithms have been harnessed within this study to create a model capable of effectively categorizing liver conditions. This involves training the model using designated training data and subsequently evaluating its performance on unseen test data to ascertain its accuracy. The process initiates by partitioning the dataset into training and testing subsets, a procedure facilitated through the cross-validation method [8]. This comprehensive approach ensures a robust evaluation of the model's predictive capabilities and underscores its aptitude for accurate liver category classification, then features selection to learn the model as shown in Fig. 5. Many algorithms are used in this study mainly:
The assessment of classifier accuracy is a comprehensive endeavor that hinges on a variety of metrics, with primary emphasis placed on Recall, Precision, and the F1-score. This evaluation unfolds after the computation of critical factors including the true positives rate (TP), true negatives rate (TN), false negative rate (FN), and false positive rate (FP) [15].
To elaborate, TP and TN correspond to the count of samples that have been correctly assigned to their designated category. In contrast, FP and FN represent the instances in which samples have been inaccurately excluded from or attributed to the category in question. These foundational metrics contribute to a nuanced understanding of the classifier's performance, ultimately shaping our perception of its efficacy in accurately classifying liver conditions.
-
TP: The number of samples which are correctly assigned to the given category, “sick people correctly identified as sick”
-
TN: The number of samples which are correctly assigned not to belong to category, “Healthy people correctly identified as healthy”
-
FP: The number of samples which are incorrectly assigned to the category, “Healthy people incorrectly identified as sick”.
-
FN: The number of samples which are incorrectly not assigned to the category, “Sick people incorrectly identified as healthy”.
Accuracy checks how many samples are classified correctly. It provides an evaluation of how much the outcomes are matched to the original outcome according to Eq. (5)
$$Acc=\frac{{T}_{P}+{T}_{N}}{{T}_{P}+{T}_{N}+{F}_{P}+{F}_{N}}$$
5
Precision estimates how precise the behavior of the suggested method is, by analyzing the correct TPs from the forecasted ones. according to Eq. (6)
$$Precision=\frac{{T}_{P}}{{T}_{P}+{F}_{P}}$$
6
Recall or Sensitivity is defined as the rate of correct detection of samples that are positives. It provides the possibility of attaining the correct test outcome. As in Eq. (7)
$$Sensitivity=\frac{{T}_{P}}{{T}_{P}+{F}_{N}}$$
7
The F-measure serves as the harmonic means between precision and recall, affording equal importance to both metrics. This measure provides a unified assessment that encapsulates both precision and recall, utilizing a singular score. This is particularly valuable when evaluating a model's performance and making comparisons between different models. according to Eq. (8)
$$F-measure=\frac{2\left(precision* recall \right)}{precision+ recall }$$
8